I have a bar chart component that has a client tag bound to the background color of the chart itself. Using a propertyChange script, I’m changing the background color of the bar chart legend to the same color as the background of the chart (for some reason these aren’t the same by default). The issue I run into is that this works just fine initially, but as soon as the data is updated it changes back to the default white background color. I’m a little confused as to why this happens when I only set the color once. Here’s the propertyChange script.
if event.propertyName == "componentRunning" chart = event.source.getChart() plot = chart.getPlot() plotColor = plot.getBackgroundPaint() legend = chart.getLegend() legend.setBackgroundPaint(plotColor)