CategoryDataSet and LineAndShapeRenderer

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
sabonzo
Posts: 2
Joined: Tue Jan 06, 2015 3:29 pm
antibot: No, of course not.

CategoryDataSet and LineAndShapeRenderer

Post by sabonzo » Tue Jan 06, 2015 3:36 pm

Hi I have a DefaultCategoryDataset which I am using for a Line chart. It creates stacked bars using a KeyToGroupMap and GroupedStackedBarRenderer.
on the top of the bars I would like to create a line chart , that is why i use the LineAndShapeRenderer to make it. It works fine,
my x-Axis starts from year 2015 to year 2024
so for each year there is a stacked bar (2 colors, red for internal-costs and blue for external-costs)
and also for each year there is a datapoint for the line chart from year 2015 to year 2024
I would like to display the chart as following:
the bars using the GroupedStackedBarRenderer range from year 2015 to 2024
the lines using the LineAndShapeRenderer range from year 2018 to 2021

is that possible? Can anyone help me?

Best regards,
sabonzo

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: CategoryDataSet and LineAndShapeRenderer

Post by david.gilbert » Wed Jan 07, 2015 7:22 am

David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

sabonzo
Posts: 2
Joined: Tue Jan 06, 2015 3:29 pm
antibot: No, of course not.

Re: CategoryDataSet and LineAndShapeRenderer

Post by sabonzo » Wed Jan 07, 2015 10:46 am

Thanks a lot, David :)
That solved my problem!

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Re: CategoryDataSet and LineAndShapeRenderer

Post by david.gilbert » Thu Jan 08, 2015 6:29 pm

No problem!
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked