Java JFreeChart-子地块之间的共享十字线

Java JFreeChart-子地块之间的共享十字线,java,jfreechart,subplot,Java,Jfreechart,Subplot,我想知道如何共享十字线。我有一个带有5个xyplot的组合xyplot,当我点击图形时,我希望每个子图上都有一个十字线。目前,当我单击子地块时,十字线仅显示在该子地块上: List<XYPlot> lxyp = t.getSubplots(); for (XYPlot xyp : lxyp) { xyp.setDomainCrosshairVisible(true); xyp.setDomainCrosshairLock

我想知道如何共享十字线。我有一个带有5个xyplot的组合xyplot,当我点击图形时,我希望每个子图上都有一个十字线。目前,当我单击子地块时,十字线仅显示在该子地块上:

List<XYPlot> lxyp = t.getSubplots();
        for (XYPlot xyp : lxyp) {
            xyp.setDomainCrosshairVisible(true);
            xyp.setDomainCrosshairLockedOnData(false);
            xyp.setRangeCrosshairVisible(false);
        }
List lxyp=t.getsubplot();
对于(XYPlot xyp:lxyp){
xyp.setDomainCrosshairVisible(true);
xyp.setDomainCrosshairLockedOnData(假);
xyp.setRangeCrosshairVisible(假);
}
那么,如何改变这个十字线的颜色和厚度呢


谢谢你的回复

我不熟悉
组合XYPLOT
,但该方法可能可用。这提供了的所有功能


我不熟悉
组合XYPLOT
,但该方法可能可用。这提供了的所有功能


谢谢你的回复,垃圾神,但它不起作用。十字线仍然只出现在我单击的子地块上,子地块仍然是独立的。请确保在每个子地块上设置所需的属性。感谢您的响应垃圾神,但它不起作用。十字线仍然只出现在我单击的子地块上,子地块仍然是独立的。请确保在每个子地块上设置所需的属性。
subplot1.setDomainCrosshairVisible(true);
subplot1.setDomainCrosshairPaint(Color.red);
subplot1.setDomainCrosshairStroke(new BasicStroke(1f));
...
subplot2.setDomainCrosshairVisible(true);
subplot2.setDomainCrosshairPaint(Color.blue);
subplot2.setDomainCrosshairStroke(new BasicStroke(1f));