Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Chart Axis Scale
Chart Axis Scale [message #362805] Mon, 26 May 2008 21:31 Go to next message
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 Go to previous message
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
>
Previous Topic:Deployment
Next Topic:parameter joint data set
Goto Forum:
  


Current Time: Mon Sep 22 10:31:53 GMT 2014

Powered by FUDForum. Page generated in 0.02339 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software