Changing the Axis Through Scripting

Hey y’all!

So I was put into a project that currently has these pens that are coming from a database. Although the Labels for each of the tags are given an an axis, specified by their SI Units, the y-axis are not set by the SI Units but rather the tags. So whenever I select/deselect the checkbox, their trend line goes away/reappears. What I wanted to do was instead of adding/removing the specific tag, I wanted to select/deselect which SI units I wanted to appear/disappear. Is there a way for me to set or change the axis for the tags through Scripting? If so, may someone point me into the right direction? I would gratefully appreciate it. Thank you!

There is a way to do it, though I’ll say it is much easier to achieve with the standard chart component, but possible with the easy chart.

It is not trivial with the standard chart component, particularly if you’ve never dug around in the JFree Chart API. Utilizing the Easy chart is possible but you will continually run into road blocks particularly in this case where you want to respond to a check box being selected. You will need to add your own check box components outside of the easy chart, for this to work at all, as you cant change the function of the check boxes included with the component.

This thread goes through a solution to a different issue, but details changing the axis of the chart.

I may need to take the second approach because I am not able to switch the type of chart, unfortunately. But your link does bring up an idea, so thank you so much for responding!