'How to keep an icon in one side of a chart in JFreeChart Java
I have the following chart:
The chart is dynamic and has the capability of make zoom in and zoom out. I want to put an icon that is created as:
BufferedImage triangleIcon = null;
try {
triangleIcon = ImageIO.read(getClass().getClassLoader().getResource("Resources/Imagenes/triangulo.png"));
} catch (IOException e) {
}
And can be placed in any point as:
xyannotation = new XYImageAnnotation(XValue, YValue, triangleIcon);
this.xyplot.addAnnotation(xyannotation);
I want to put this icon at any Y value but always next to the left side of the chart, without taking into account the zoom. Something like:
Is it possible?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|


