I want to create a bar-chart, but extraordinary high values should be shortened. An example is this image:
shortened graph http://www.epa.gov/recovery/images/bar-chart.gif
I hope it is clear what I want.
My question is: How can I do this with JFreeChart. If it isn't possible with JFreeChart you can possibly recommend alternative open-source Java-libraries to produce such an output.
I'm not sure you can do that in JFreeChart.
A solution (which is not nice) is to render the chart to an image and then manipulate it (chop it up etc.) as an image, using RenderedImage, and not as a JFreeChart. Unfortunately that's going to be a bit of a pain since you'd probably want to chop at a particular place on the y-axis etc.
You could do it with a
CombinedDomainCategoryPlot
orCombinedDomainXYPlot
. Set the range axis of the first plot to your cut off value and then do something similar with the second plot. Then add them to a combined plot.The plots will share the same X-axis. You'll need to play with the renderers to set colours and labels.
removed dead ImageShack link