JFreeChart链接轴 [英] JFreeChart Link Axes
问题描述
我创建了一个带有两个独立的JFree图表的框架(以2x1网格布局保存).顶部的图表显示了Canlestick图表,底部的显示了时间序列图.我想做的是链接两个图表的显示X轴,这样当我放大一个图表时,另一个图表就会放大到相应的时间段.
I have created a Frame with two independent separate JFree charts (held in a 2x1 Grid layout). The top chart shows a Canlestick chart, the bottom a time series plot. What I would like to do is link the displayed X-Axis of both charts so that when I zoom in on one chart the other chart zooms to the corresponding time period.
这可能吗?如果可以,请给我一个例子
Is this possible? If so could you give me an example
推荐答案
您需要的称为CombinedDomainXYPlot
.代替创建独立的JFreeChart对象,您将需要创建一个组合图并将所有图放置在那里.
What you need is called CombinedDomainXYPlot
. Instead of creating independent JFreeChart objects you will need to create one Combined plot and put there all plots needs to be linked.
这篇关于JFreeChart链接轴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!