Chart: How to get maximum y-axis value within beforeGeneration()? [message #185021] |
Tue, 15 August 2006 10:59 |
Eclipse User |
|
|
|
Within a stacked chart, I'd like to programmatically set the step size
based on the maximum value on the Y-axis.
function beforeGeneration( chart, context) {
axBase = chart.getPrimaryBaseAxes()[0];
axis = chart.getOrthogonalAxes(axBase, true)[0];
//
// PROBLEM: axis.getScale().getMax() returns NULL !!!
//
maxValue = axis.getScale().getMax();
if ( maxValue != null) {
axis.getScale().setStep(maxValue / 20.0);
}
}
As noted in the code, the maximum Y-axis value is null when queried. So
how would one determine the maximum Y-axis value in the
beforeGeneration() operation?
|
|
|
Powered by
FUDForum. Page generated in 0.04428 seconds