SeriesGroups not reacting at Runtime
Posted: Mon Nov 02, 2009 7:36 pm
I drop a DBchart on a form.
I then Add 20 series.
I add two Seriesgroups, and assign the series 10 to each seriesgroup.
Each series points to its respective datasource.
I then tick one of the two seriesgroups, and the chart then displays correctly at runtime.
Now I try to change the active seriesgroup at runtime, without any effect:
With DBChartBlup do
begin
SeriesGroups.Items[0].Active:=TSeriesGroupActive(1);
SeriesGroups.Items[1].Active:=TSeriesGroupActive(0);
RefreshData;
end;
No matter what I do:
SeriesGroups.Items[0].Active:=TSeriesGroupActive(0);
SeriesGroups.Items[1].Active:=TSeriesGroupActive(0);
or
SeriesGroups.Items[0].Active:=TSeriesGroupActive(1);
SeriesGroups.Items[1].Active:=TSeriesGroupActive(1);
seriesgroups remain at what they where set to in the IDE.
So, how do I achieve this at runtime, without having to set up all the series, and seriesgroups etc at runtime.
Regards
Adrian
I then Add 20 series.
I add two Seriesgroups, and assign the series 10 to each seriesgroup.
Each series points to its respective datasource.
I then tick one of the two seriesgroups, and the chart then displays correctly at runtime.
Now I try to change the active seriesgroup at runtime, without any effect:
With DBChartBlup do
begin
SeriesGroups.Items[0].Active:=TSeriesGroupActive(1);
SeriesGroups.Items[1].Active:=TSeriesGroupActive(0);
RefreshData;
end;
No matter what I do:
SeriesGroups.Items[0].Active:=TSeriesGroupActive(0);
SeriesGroups.Items[1].Active:=TSeriesGroupActive(0);
or
SeriesGroups.Items[0].Active:=TSeriesGroupActive(1);
SeriesGroups.Items[1].Active:=TSeriesGroupActive(1);
seriesgroups remain at what they where set to in the IDE.
So, how do I achieve this at runtime, without having to set up all the series, and seriesgroups etc at runtime.
Regards
Adrian