Adding points at runtime
Posted: Mon Jan 19, 2004 3:51 pm
I need to create a grouped bar diagram (MultiBar := mbSide) at runtime. This works fine as long as all groups have the same values.
For example, with this values all works fine, if I want to show these values grouped by month:
Product code Month Quantity produced
10 Jan 300
10 Feb 325
10 Mar 287
12 Jan 175
12 Feb 223
12 Mar 241
14 Jan 461
14 Feb 470
14 Mar 455
But if I have not for all months all products it won't work. Therefore with this values it won't work (missing product 12 in february):
Product code Month Quantity produced
10 Jan 300
10 Feb 325
10 Mar 287
12 Jan 175
12 Mar 241
14 Jan 461
14 Feb 470
14 Mar 455
I use the following code to create the chart:
with Chart.AddSeries(TBarSeries) do begin
Title := ProductCode
AddXY(GroupSortOrder, Quantity, Month);
end;
Where GroupSortOrder is a unique integer value for each month
For example, with this values all works fine, if I want to show these values grouped by month:
Product code Month Quantity produced
10 Jan 300
10 Feb 325
10 Mar 287
12 Jan 175
12 Feb 223
12 Mar 241
14 Jan 461
14 Feb 470
14 Mar 455
But if I have not for all months all products it won't work. Therefore with this values it won't work (missing product 12 in february):
Product code Month Quantity produced
10 Jan 300
10 Feb 325
10 Mar 287
12 Jan 175
12 Mar 241
14 Jan 461
14 Feb 470
14 Mar 455
I use the following code to create the chart:
with Chart.AddSeries(TBarSeries) do begin
Title := ProductCode
AddXY(GroupSortOrder, Quantity, Month);
end;
Where GroupSortOrder is a unique integer value for each month