JFreeChart:是否可以将堆叠的条形图和折线图组合在一起? [英] JFreeChart: is it possible to combine a stacked bars and line chart combined?

查看:132
本文介绍了JFreeChart:是否可以将堆叠的条形图和折线图组合在一起?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如该模型中所示:

我知道可以使用org.jfree.chart.plot.CombinedDomainXYPlot将图表彼此相邻显示,但是也可以使用不同的Y轴将它们重叠显示(一个用于图表左侧的堆叠条形,另一个用于显示在图表右侧的折线图)?

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)?

推荐答案

是的,标题为的图表在多轴图表中显示的 DualAxisDemo1 是一个示例.除了第二个数据集和渲染器,还需要第二个轴,如本 question&答案.这个相关的示例结合了两个渲染器;这个相关的示例结合了两个轴.

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.

这篇关于JFreeChart:是否可以将堆叠的条形图和折线图组合在一起?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆