Yes, it would be another series, however, because you are providing the renderer you can control this.
There is no way to stop the execution, so you have to write the code in a way that this is not in play. Create the renderer class in the configureChart Extension function and then let the chart code call the renderer when it needs to.
Add a Column of type Integer or Short (the chart will argue with you if you use another type such as boolean.)
Then place this code in your configureChart extension function. This code has been tested and does work in vision 7.9
from java.awt import Color
from org.jfree.chart.renderer.xy import XYLineAndShapeRenderer
from java.awt.geom import Rectangle2D
#grabs a reference to plot of the chart
plot = chart.getPlot()
if series == 0 and plot.getDataset(0).getYValue(1, row) > 0:
elif series == 0:
#create an instance of your renderer
renderer = MyRenderer()
#Force the colorFlag not to render
#These lines modify the rendering of the data series
renderer.setSeriesShape(0, Rectangle2D.Double(-3, -3, 6, 6))
#set the renderer of the plot to your custom renderer
Just a few modifications from what @jpark posted above, I added some comments to help explain what is happening. Notice that we are setting the lines and shapes of series 1 to not be visible, this keeps your added column from rendering to the chart.
In the getItemPaint we check the value of series 1 value for the given row, if it is greater than 0 then we choose a different color. If you remove the “elif” segment of the code then default color will be used for the series. Any row which has a positive non-zero value will paint with the modified color. This is why if you only ever want 1 point to have the modified color you need to insure that only 1 row has a positive non-zero number.