Classic Chart

I am attempting to use classic chart to create a real time trend graph with user selectable pens ( on/off ). Should I create multiple datasets with each pen in a dataset ? I can’t seem to find away to access the “dataset enable” property I see under “chart customizer”—> “dataset properties” through scripting ?

I am not using the Easychart version as I am streaming the data through scripting ( Vision Panel Edition ). I want to make sure this is the correct decision as this component seems to be based on having an active database which I do not. Thanks in advance.

With the classic chart you will have to make your own checkboxes to show / hide pens. Based on which checkbox they select you can call:chart = event.source.parent.getComponent('Chart') chart.setSeriesEnabled("Data", "Column Name", 0)You would replace the “Column Name” with the pen you want to hide or show. To hide that last argument should be 0, to show it should be 1.

Perfect. Thanks Travis !!!

Hi. One more quick question. Where is this documentation for this located ? I can’t find any reference in the manual. Thanks.

I have the same problem too. I figure out using dir(), but more later I discover that was documented in the manual of FactoryPMI (now called Vision Module in Ignition). … _Chart.htm

In that documentation there are some information that it’s not in the new doc’s.


Okay… thanks pdibenedetto.

Now I have another property I would like to script “Fixed Auto Range” on the x axis. I tried “axis.setfixedAutoRange(100000)” but this does not work. Is there documentation on this property somewhere that I am missing ? Thanks !

Like this:chart = event.source.parent.getComponent('Chart') chart.getYAxes().get("Default Y Axis").setFixedAutoRange(100000) chart.initialize()