Page 1 of 1

Axis maximum when not visible

Posted: Mon Apr 11, 2005 4:59 pm
by 9336985
Hi,

I have a problem determining an Axis maximum when the chart is not visible. In following code Series1 is a horizontal box plot but I doubt it matters what the series is:

self.Series1.AddXY(10, 10);
self.Series1.AddXY(12, 10);

self.Chart1.Update;

showMessage( FloatToStr(self.Chart1.BottomAxis.maximum) );

Chart1 is on a tab sheet. If that tab sheet is selected when this code executes, it returns 12 - as expected. However, if this code is executed when a different tab sheet is selected - i.e. the chart isn't visible, it returns 0. I need this value so I can set another chart's axis to the same maximum value. Sample project available if u need it.

Also, did anyone note the Histogram bin width error from my thread "Histogram Bin Width"? We had to drop histograms and replace them with area charts. The histogram is too buggy.

Regards,

Rick

Posted: Tue Apr 12, 2005 8:13 am
by narcis
Hi Rick,

It may help you forcing the chart being drawn by using Chart1.Draw; If it doesn't help please post your project we can run "as-is" to reproduce the problem here at [url]news://www.steema.net/steema.public.attahcments[/url] newsgroups.

Regarding the HistogramSeries bin width issue please see Marjan's reply at the forum thread you started.

Posted: Tue Apr 12, 2005 3:33 pm
by 9336985
Hi Narcis,

The call to .Draw solved the problem, thanks. I had worked around it by getting the series' maximum.

Regards,

Rick