Linear date x axis with dbchart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Des O'Toole
Newbie
Newbie
Posts: 2
Joined: Fri Sep 07, 2001 4:00 am

Linear date x axis with dbchart

Post by Des O'Toole » Sat Dec 06, 2003 12:16 pm

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

Marjan
Site Admin
Site Admin
Posts: 745
Joined: Fri Nov 07, 2003 5:00 am
Location: Slovenia
Contact:

Post by Marjan » Tue Dec 09, 2003 5:55 pm

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).
Marjan Slatinek,
http://www.steema.com

Des O'Toole
Newbie
Newbie
Posts: 2
Joined: Fri Sep 07, 2001 4:00 am

Post by Des O'Toole » Thu Dec 11, 2003 11:38 am

Many thanks Marjan

Post Reply