i splited the painter in multiple objects.
i created BiorhythmLegend that dynamically generates the chart's legend.