您将不得不重写
getLegendItem()以获取所需
LegendItem的渲染器创建的渲染器。
XYPlot plot = (XYPlot) chart.getPlot();plot.setRenderer(new MyRenderer());...private static class MyRenderer extends XYLineAndShapeRenderer { @Override public LegendItem getLegendItem(int dataset, int series) { LegendItem legendItem = super.getLegendItem(dataset, series); System.out.println(dataset + " " + series + " " + legendItem.getShape()); // modify legendItem here return legendItem; }}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)