• Right click on the chart and select: "Chart Customizer"
• Switch to the "Dataset Properties" tab, select the dataset, and change the renderer to "XY Step Renderer"
Use interval markers for this purpose.
Example:
# configureChart Extension Function
#def configureChart(self, chart):
# Import interval marker class
from org.jfree.chart.plot import IntervalMarker
# Range 0 to 12 earth green
chart.plot.addRangeMarker(IntervalMarker(0, 12, system.gui.color(56, 94, 15, 80)))
# Range 12 to 24 teal
chart.plot.addRangeMarker(IntervalMarker(12, 24, system.gui.color(0, 128, 128, 80)))
# Range 24 to 36 light blue
chart.plot.addRangeMarker(IntervalMarker(24, 36, system.gui.color(173, 216, 230, 140)))
# Range 36 to 48 light grey
chart.plot.addRangeMarker(IntervalMarker(36, 48, system.gui.color(128, 128, 128, 80)))
# Range 48 to 60 peach
chart.plot.addRangeMarker(IntervalMarker(48, 60, system.gui.color(255, 218, 185, 80)))
# Range 60 to 72 light orange
chart.plot.addRangeMarker(IntervalMarker(60, 72, system.gui.color(255, 179, 74, 80)))
# Range 72 to 96 light red
chart.plot.addRangeMarker(IntervalMarker(72, 96, system.gui.color(255, 99, 74, 80)))
Result: