Chart Axis Scale [message #362805] |
Mon, 26 May 2008 21:31 |
Eclipse User |
|
|
|
Originally posted by: rouz.shaw.ca
Hi there guys,
I have a 2 y-axis bar chart and I wanted them to have an equal scale. Is
there a way to set one of the y-axis' scale equal to the other? I need the
scale to be dynamic dependent on one of the series.
Cheers,
Rouzbeh
|
|
|
Re: Chart Axis Scale [message #362841 is a reply to message #362805] |
Tue, 27 May 2008 19:15 |
Eclipse User |
|
|
|
Originally posted by: jasonweathersby.alltel.net
Rouzbeh,
I have not tried this but you may be able to do this in the
beforeGeneration script.
function beforeGeneration(chart, icsc)
{
importPackage( Packages.org.eclipse.birt.chart.model.data.impl );
xAxis = chart.getBaseAxes()[0];
yAxis1 = chart.getOrthogonalAxes( xAxis, true)[0];
yAxis2 = chart.getOrthogonalAxes( xAxis, true)[1];
yscale1 = yAxis1.getScale();
yscale2 = yAxis2.getScale();
yscale2.setStep(NumberDataElementImpl.create(yscale1.getStep ()));
yscale2.setMin( NumberDataElementImpl.create(yscale1.getMin()));
yscale2.setMax( NumberDataElementImpl.create(yscale1.getMax()));
yAxis2.setScale(yscale2);
}
Jason
Rouzbeh wrote:
> Hi there guys,
>
> I have a 2 y-axis bar chart and I wanted them to have an equal scale. Is
> there a way to set one of the y-axis' scale equal to the other? I need
> the scale to be dynamic dependent on one of the series.
> Cheers,
>
> Rouzbeh
>
|
|
|
Powered by
FUDForum. Page generated in 0.03055 seconds