bwhite
February 15, 2023, 4:47pm
1
I am trying to make some changes to an existing application that used the Vision Classic Chart component. I need to add a dataset but enable it using scripting. I cannot find the syntax for the dataset properties script to turn on the enable bit. Can anyone point me to the list of scripting for these properties?
I've tried these:
event.source.chartDataSet1.enable
event.source.chartDataSet1.dataset.enable
lrose
February 15, 2023, 6:10pm
2
I'm not sure exactly what you mean? If you add a data set to the chart, then it is automatically enabled.
Or are you trying to add a data set to the JFreeChart object itself?
Perhaps a screen snip of what you expected vs. what you got?
1 Like
bwhite
February 15, 2023, 6:42pm
3
I have several datasets on the chart and want to enable and disable them within a script.
pturmel
February 15, 2023, 7:03pm
5
That one is probably worth putting into the manual under "Component Functions":
Vision Chart Component
4 Likes
bwhite
February 15, 2023, 7:56pm
6
Thank you! I have a related item. I have a power table and I want to change the attributes on a script. I have this working:
if colName == 'percentage':
if value < 90.0:
attributes["background"] = "#ea0000 "
But I want to also change the suffix to a %. I tried attributes["suffix"] = '%', but that didn't work.
bwhite
February 15, 2023, 9:15pm
7
I've also tried this on the configureHeaderStyle scripting:
if bool:
return {'label': "on count"}
else:
return{'label': "off count"}