The problem i presume is the data range no longer includes the constant value. Is there a way to set the Y-axis to always include the constant value even if the actual data isn't within that range?
This is the script I have to add the constant line to the timeserieschart currently.
from java.awt import Color
from java.awt import BasicStroke;
from org.jfree.chart.plot import ValueMarker
red = Color(255, 0, 0)
stroke = BasicStroke(2.0)
marker = ValueMarker(126, red, stroke)
chart.getPlot().addRangeMarker(marker)
I would replace the range axis with one that dynamically computed its upper/lower range from the data and any auxiliary values whenever it is asked for upper/lower.
I vaguely recall doing this at one point to deal with Vision's classic chart not calling configureChart() after fresh data arrives. But I only found this:
The technique for delegating range requests to other data instead of constants would be similar to that dynamic range marker.