TDBAdvChartView and multiseries bar graph

I need to create a graph that shows monthly results from different sales persons across the year, so X-axis is from 1...12 and Y-axis is sales amount.

where ORDER_DATE between  '2012-1-1' and '2012-12-31'
group by MONTH,NAME

Is it possible to do it at least semiautomatically or do I have to enter all series and points into graph manually?


If you have created a Query, you can assign the Query to a DataSource, assign the Datasource to the TDBadvChartView Pane and then select the appriopriate X-Axis and Y-Axis fields on serie level. These can be set in the editor at designtime, or via properties at runtime. You need to manually add a serie, the points should be automatically loaded if the properties are set correctly.

Kind Regards, 
Scheldeman Pieter


I know how it works in general. I’m confused how to do it in the case where data is like:
Month | Person| Sales

1 | Peter | 123.56

1 | Thomas | 500.00

1 | Lucy | 4532.45

2 | Peter | 1253.65

2 | Thomas | 550.00

2 | Lucy | 452.45

3 | Peter | 143.56

3 | Thomas | 56.00

3 | Lucy | 452.58


X- axis I will define as MONTH, but how could I link the series to the Persons field, so in this graph would be 3 series (Peter, Thomas, Lucy). 

When I manually add new series that should contain data about Peter’s sales, then what property/value should I use?

Unfortunately that the DBAdvChartView can only display one DataSource at a time. You can try to create a new table based on the results of the main table and create a column for each Person:

Month  Peter Thomas Lucy
1           123.56
2           1253.65

Then you need to assign the DataSource to the Pane
and the FieldNameXAxis and FieldNameValue properties of the serie:

Panes[0].Series[0].FieldNameXAxis := 'Month';
Panes[0].Series[0].FieldNameValue := 'Peter';

Panes[0].Series[1].FieldNameXAxis := 'Month';
Panes[0].Series[1].FieldNameValue := 'Lucy';

Kind Regards, 
Scheldeman Pieter

OK, thanks, I'll do it manually then.

BTW, I am using the single DataSource (as can be seen from the initial question).
Can this be stored as a feature request fro next release as IMHO this case is pretty common in real life?

We have already added this on our feature request list for an expansion on our DB version chart.