JFreeChart XYPlot with shortcuts

I am using XYPlot in JFreeChart. All lines on it are XYSeries objects. Both axes are NumberAxis objects. The Y-Axis range is from 0 to 1, with ticks each .1. Along with the display of numbers, however, I would like to display text on the Y axis, such as High / Medium / Low. High will cover .7-1, etc. What is the best way to do this?

+4
source share
2 answers

I have experience with JFreeChart, and after a little research, I have no answer for adding three labels to the axis.

However, as an alternative approach, you should be able to outline these three areas on the chart with colors by setting MarkerAxisBand for NumberAxis (using this method ).

You can then add interval markers to the MarkerAxisBand to highlight three areas.

+1
source

try this ... it can give similare result

JFreeChart Annotations not working?

XYTextAnnotation textAnnotaion = new XYTextAnnotation(description, xMid, yMid); plot.addAnnotation(textAnnotaion); textAnnotaion.setRotationAngle(90.0); 
0
source

Source: https://habr.com/ru/post/1277261/


All Articles