Page 1 of 1

visibility of right axis ticks and labels

Posted: Wed Nov 21, 2007 8:27 pm
by 9232632
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.

Posted: Thu Nov 22, 2007 10:22 am
by narcis
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.

Posted: Mon Nov 26, 2007 2:12 pm
by 9232632
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

:):)

Posted: Mon Nov 26, 2007 2:17 pm
by narcis
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.

Posted: Thu Nov 29, 2007 5:37 pm
by 9232632
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.

Posted: Fri Nov 30, 2007 10:01 am
by narcis
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.