Page 1 of 1

Linear date x axis with dbchart

Posted: Sat Dec 06, 2003 12:16 pm
by 5888947
Hi

I have a dbchart hooked up to a dataset that groups by quarter (using the summary option) and gives me a y axis bar showing the number of entries for that quarter.

The only problem is that if there are no entries for a particular quarter, it gets missed of the graph (eg there would be no '1/2003' on the x-axis and '4/2002' would be alongside '2/2003' with no gap in between) . How can I get it to show as an empty space ?. In other words I want the x axis to be linear over the whole range, rather than only containing the entries that exist.

Can anyone help?

Des

Posted: Tue Dec 09, 2003 5:55 pm
by Marjan
Hi, Des.

Somehow the summary is leaving out points with zero (no points) sum. In this case the easiest solution is to generate query result (with x,y values and if needed, x labels) outside TeeChart and then connect it to appropriate TDBChart series. Or you can even get data from query and pass it to series by using standard TChartSeries.AddXY method. This way you can fully customize each point x and y position (along with axis label).

Posted: Thu Dec 11, 2003 11:38 am
by 5888947
Many thanks Marjan