Hariprasath
Hariprasath

Reputation: 810

How to combine area chart and line chart in jfreechart

I want to combine area chart and line chart in jfree chart. I have searched but i can't get the solution or any hint for that. Will line and area charts can combine jfreechart ? If so please give me any idea or sample code for that. Thankyou in advance.

Upvotes: 0

Views: 1295

Answers (2)

Oliver Watkins
Oliver Watkins

Reputation: 13499

You can create multiple series types in Iceberg-Charts :

http://frontangle.com/#/icharts/screenshots

You can use 2 y-axis and then set area for the area series that you need, and set the line for the lines series. You would also need to understand if you want a stacked or side by side area chart.

Upvotes: 1

Michael Ding Dong
Michael Ding Dong

Reputation: 11

Yes, DualAxisDemo1 in the JFreeChart Demo is an example. In addition to a second data set and renderer, you need a second axis, as discussed in this question & answer.

Upvotes: 0

Related Questions