Advice needed

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
cardybean
Posts: 8
Joined: Tue Dec 10, 2013 2:45 pm
antibot: No, of course not.

Advice needed

Post by cardybean » Tue Dec 10, 2013 2:46 pm

Hi there,

I am looking to identify which type of chart/graph I need to create with JFree to create the following graph?

Image

EDIT: I have checked out each graph in the JFree demo, but could not find one similar.

Gxb0514
Posts: 10
Joined: Mon Dec 02, 2013 2:30 am
antibot: No, of course not.

Re: Advice needed

Post by Gxb0514 » Fri Dec 13, 2013 3:59 am

Hi

Yes you can create this graph. You just need to use two different data renderers. Use an area fill for the data series with the shaded in region, and use a standard line renderer for the other data sets.

Your domain axis (x-axis) will likely need to be set up as a category plot since it not really numerical.

Hope this helps

cardybean
Posts: 8
Joined: Tue Dec 10, 2013 2:45 pm
antibot: No, of course not.

Re: Advice needed

Post by cardybean » Fri Dec 13, 2013 11:19 pm

Thanks for the response Gxd.

I will now study the API to see how to create render/add multiple render. Can't seem to find a good example to use....

EDIT: Typo
Last edited by cardybean on Wed Dec 18, 2013 2:01 pm, edited 1 time in total.

Gxb0514
Posts: 10
Joined: Mon Dec 02, 2013 2:30 am
antibot: No, of course not.

Re: Advice needed

Post by Gxb0514 » Sun Dec 15, 2013 3:37 am

Here check these out

You should be able to use the overlaid example as your skeleton

http://www.java2s.com/Code/Java/Chart/J ... rtDemo.htm

Then you just need to replace the bar graph with an area data series and renderer as you can see here.

http://www.java2s.com/Code/Java/Chart/J ... rtDemo.htm

Giorgio

cardybean
Posts: 8
Joined: Tue Dec 10, 2013 2:45 pm
antibot: No, of course not.

Re: Advice needed

Post by cardybean » Wed Dec 18, 2013 2:02 pm

Thanks for your further response Gxd. Absolute God-send!

Locked