visibility of right axis ticks and labels

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

visibility of right axis ticks and labels

Post by rperkins » Wed Nov 21, 2007 8:27 pm

is there a way to make the right axis ticks and labels (min thru max values) visible on a chart that has no series visible?

i have 5 charts left to right. the left chart has the left "info" and the right chart has the right "info". this works fine when there are visible series on all charts (at least the left and right ones). now, i have a situation where only the left most chart has a visible series. i can get the title to behave, but i haven't been able to get the ticks/labels.

thanks.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Nov 22, 2007 10:22 am

Hi rperkins,

To have chart's displaying axes scales without populating them you should set their minimum and maximum values. For example, using SetMinMax method.

For more information on axes setting please read Tutorial 4 - Axis Control. Tutorials can be found at TeeChart's program group.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

Post by rperkins » Mon Nov 26, 2007 2:12 pm

i already do this. i ran the app thru the debugger and the values found in the chart object indicate that they are set correctly (-5 and +32.5 approx). i also checked the visibility of the axis, ticks and labels - all are set to visible=true. will be back to more investigating in a bit.

any suggestions - additional events to respond to, etc. - are greatly appreciated.

thanks

:):)

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Nov 26, 2007 2:17 pm

Hi rperkins,

Forgot to say that, at least, you need to have one visible series in the chart even it doesn't have any data. You could use a dummy series for that or just not populate your series.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

rperkins
Newbie
Newbie
Posts: 58
Joined: Wed May 26, 2004 4:00 am

Post by rperkins » Thu Nov 29, 2007 5:37 pm

well, if i have at least one series, then, won't the grid lines show up on the chart? what i'm shooting for is to have a blank grid if no data is available, but still have the right axis/tick marks.

i already have some code in the OnAfterDraw handler that counts the number of visible series on the chart. if the number is 0, then i cover the chart with a "No Data Available" image. Note: tried to have this image posted to the background of the chart when no data is available - blank otherwise, but gave up after several hours of trying. that's when i came up with the cover image.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 30, 2007 10:01 am

Hi rperkins,
well, if i have at least one series, then, won't the grid lines show up on the chart? what i'm shooting for is to have a blank grid if no data is available, but still have the right axis/tick marks.
In that case you could hide the grid doing this:

Code: Select all

  Chart1.Axes.Right.Grid.Visible:=false;
i already have some code in the OnAfterDraw handler that counts the number of visible series on the chart. if the number is 0, then i cover the chart with a "No Data Available" image. Note: tried to have this image posted to the background of the chart when no data is available - blank otherwise, but gave up after several hours of trying. that's when i came up with the cover image.
You could try using TChartImageTool for that.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply