Search code examples
javajfreechartaxisrenderer

Mark current value on axis - jfreecharts


I'm implementing dynamic charts with XYPlot and TimeSeries. I'm continually adding new values to chart. How can I mark on Y axis last added value? Some custom renderer or just simple change font size... any ideas?


Solution

  • One option is to add a ValueMarker to the plot via the addRangeMarker() method.

    This will typically add a line across the plot perpendicular to the y-axis, as shown here.