Configuring Vision chart with subplots

If I have 4 separate plots on a single chart, how would you apply these labels to every line in the chart? This code only adds the labels to the top line/plot but the other three remain unchanged.

Thanks!

Something like this (untested):

from org.jfree.chart.labels import StandardXYItemLabelGenerator

# handle charts with single or multiple plots
plots = getattr(chart.plot, "subplots", [chart.plot])
for plot in plots:
	plot.renderer.itemLabelGenerator = StandardXYItemLabelGenerator()
	plot.renderer.baseItemLabelsVisible = True
2 Likes

A post was split to a new topic: Customizing renderer for points on a Vision chart