JFreeChart: is it possible to combine a stacked bars and line chart combined?

我们两清 提交于 2019-12-10 13:54:39

问题


As in this mockup:

I know it is possible to have charts display next to each other using org.jfree.chart.plot.CombinedDomainXYPlot, but is it possible to have them overlaid, possibly using different Y axes (one for the stacked bars to the left of the chart, and one for the line chart shown to the right of the chart)?


回答1:


Yes, the chart entitled DualAxisDemo1, shown among the Multiple Axis Charts, is an example. In addition to a second data set and renderer, you need a second axis, as discussed in this question & answer. This related example combines two renderers; this related example combines two axes.



来源:https://stackoverflow.com/questions/3807992/jfreechart-is-it-possible-to-combine-a-stacked-bars-and-line-chart-combined

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!