Jump to content
We've recently updated our Privacy Statement, available here ×

Multi-Axis differing scale


petruch

Recommended Posts

How can I get all of the y-axis to be the same scale with a multi-axis.  I want 2 line graphs and one bar chart, the line graphs measure different expected performance.  The bar graph represents actually scores with the category being the employees’ performance.  The varying scales make this chart hard to interpret at a glance.

Link to comment
Share on other sites

  • Replies 7
  • Created
  • Last Reply

Top Posters In This Topic

petruch,

 

Normally if you want 2 lines, then they would be part of the same line chart. Therefore they would have the same axis. Is there a reason you can't do that?

 

Regardless of your answer to the first question above, I think there's not a simple way to get what you want today. It's possible, but it takes some coding.

 

It's most common when putting different charts together that you want them to have different scales. So the default behavior is reasonable... but I can see why your requirement is different and also valid. The use of JasperReports chart themes will allow you to set the axes. But the chart themes that currently ship with JasperReports, iReport, and JasperServer don't have a setting for this. So you would need to do some Java coding to expose this extra chart property and then set it in your report.

 

The updated chart themes that ship with the next release of JasperServer will have this property already defined. So you will be able to achieve what you want just by setting the appropriate property on the chart in the report.

 

Regards,
Matt

Link to comment
Share on other sites

 

Thank you for the response.

The boss likes the following chart.

The bar graph recording the employee’s quota overlaid in correct perspective by, 1)  the line graph identifying the performance expectation. 2) Another line graph displays the company’s average performance.

When I can get time with the more senior developers we will proceed with the coding you suggest.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Matt. I was having a similar issue to petruch. Another reason one wants to be able to control the axis scale is to compare charts from different runs of the same report. Anyway, when you say the next release will have this property, what is the ETA of that release (and will it be included in iReport also)?

 

Thanks,

 

clark

Link to comment
Share on other sites

Once again I spoke too soon and just had a painful moment.

iReports that I'm using has jfreechart-1.0.3.

The demo report I like uses jfreechart-1.0.12

Without thinking I replaced the jfreechart.jar jcommons.jar itest.jar in my eclipse reference libaries.

This then broke the iReports I had in this project.

Then changing back to the original jars to experience the pain of eclispe not rebuilding some file, I say this because I had to delete my project (and contents) and workspace then recreate it.  Now I'm back where I started wishing I was able to create the bar graph I reference above.

I'm pretty sure I have a lot to learn

Link to comment
Share on other sites

  • 7 months later...

I have not revisited this.  It seems when I left it  there was some hope that the next release would accomodate this.  We are still using IReports 3.0.0 and JasperReports3.0.0.jar.  I would still like to know how to do this.



Post Edited by petruch at 11/04/2009 14:19



Post Edited by petruch at 11/04/2009 14:19
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...