小智 6
在xy图上,您需要跟踪最后添加的xy点,然后使用以下内容添加它:
double x = 150;
double y = 300;
XYPlot plot = chart.getXYPlot();
ImageIcon imageIcon = new ImageIcon("/path/to/your/icon.png");
XYAnnotation xyannotation = new XYImageAnnotation(x, y, imageIcon.getImage());
plot.addAnnotation(xyannotation);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1823 次 |
| 最近记录: |