2009-02-09 7 views

Répondre

6

sur un terrain xy vous devez garder une trace du dernier point xy ajouté, puis l'ajouter en utilisant quelque chose comme ce qui suit:

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); 
+0

Yat-il un moyen de désactiver l'annotation décalage? – ShawnD

+0

Désolé répondu ma propre question. – ShawnD

Questions connexes