我想在 XYSplineRenderer 图表上启用显示 xy 坐标。
NumberAxis numberaxis = new NumberAxis("X");
numberaxis.setAutoRangeIncludesZero(false);
NumberAxis numberaxis1 = new NumberAxis("Y");
numberaxis1.setAutoRangeIncludesZero(false);
XYSplineRenderer xysplinerenderer = new XYSplineRenderer();
XYPlot xyplot = new XYPlot(data1, numberaxis, numberaxis1,
xysplinerenderer);
xyplot.setBackgroundPaint(Color.lightGray);
xyplot.setDomainGridlinePaint(Color.white);
xyplot.setRangeGridlinePaint(Color.white);
xyplot.setAxisOffset(new RectangleInsets(4D, 4D, 4D, 4D));
JFreeChart jfreechart = new JFreeChart("XYSplineRenderer",
JFreeChart.DEFAULT_TITLE_FONT, xyplot, true);
addChart(jfreechart);