Please help me with my problem.
We have a set of data coming from the database:
Date,Value1,Value2,Value3
for example, "07/22", 1, 2, 10
I need to get the following:
- X axis should be date
- there should be a stacked bar chart with Value1 and Value 2 being 2 components
- there should be an overlaid line chart displaying the percentage (defined as (Value1+Value2)/Value3*100%)
My problem is that the Stacked Bar Chart feeds off the CategoryDataset, and Line Chart feeds off the XYDataset.
I actually went as far as implementing my own JDBCXYIntervalDataset, so that I could combine the StackedXYBarRenderer and StandardXYItemRenderer; however, stacked XY bars look like tiny lines, while I'd like to see the beautiful stacked bars (or even better, 3D).
Any ideas how I could get that?
Stacked Bar Chart overlaid with a line chart
-
- Posts: 4
- Joined: Fri Jul 22, 2005 11:02 pm
-
- Posts: 4
- Joined: Fri Jul 22, 2005 11:02 pm
-
- Posts: 4
- Joined: Fri Jul 22, 2005 11:02 pm
-
- Posts: 2
- Joined: Thu Aug 14, 2014 3:07 pm
- antibot: No, of course not.
Re: Stacked Bar Chart overlaid with a line chart
Hi Sergey Kazachenko,
I am new to jFreeChart, in my project i have to export an overlaid stacked bar chart and line chart graph from UI to pdf, I was not able to figure out how to generate the graph, i see that you have done similar thing, please share your code to do this kind of chart. I appreciate your help.
Thanks,
Prem
I am new to jFreeChart, in my project i have to export an overlaid stacked bar chart and line chart graph from UI to pdf, I was not able to figure out how to generate the graph, i see that you have done similar thing, please share your code to do this kind of chart. I appreciate your help.
Thanks,
Prem
Re: Stacked Bar Chart overlaid with a line chart
SergeyKazachenko,
Will appreciate if you can share your solution here - I'm running into a similar problem.
I've a Gantt chart that uses GanttCategoryDataSet and I'm trying to overlay it with a line chart that uses XYDataSet. I see that you have created a custom code which will be useful for us!
Will appreciate if you can share your solution here - I'm running into a similar problem.
I've a Gantt chart that uses GanttCategoryDataSet and I'm trying to overlay it with a line chart that uses XYDataSet. I see that you have created a custom code which will be useful for us!