True, Doesn’t need a class to do this little but setting the dataset from component event doesn’t work either.
For example,
I am running property change script on root container of the template which sets the value of the dataset. When I test it, I can see it’s initializing since the number on Y-axis changes as per the data but I don’t see the chart coming up.
For those awaiting news, the root cause is that the data that needed to be displayed, can’t be displayed due to null values interspersed within the dataset. Separating them out to individual datasets solved the problem.
Dynamically adding datasets to a classic chart doesn’t exist, but could be helpful. Link to entry on ideas site, if one wants to upvote this.
Well, actually ...
You could call getDynamicProps(), which returns a TreeMap<String, DynamicPropertyDescriptor>, then add your own DynamicPropertyDescriptor to the map, and then apply it back to the chart with setDynamicProps(). Use the four argument constructor for com.inductiveautomation.factorypmi.application.binding.DynamicPropertyDescriptor - DynamicPropertyDescriptor("name", "description", com.inductiveautomation.ignition.common.Dataset, <your dataset>)
Hi, i am using classic chart in vision … in easy chart units of the tags will show in y axis(note - only if tags has different units its will show separate Y axis for each)
I am trying to achieve same thing in classic chart (is there any jfree script to achieve my requirement)
i am trying to show separate Y axis for tags if units are different
Yes for each tag i have separate dataset. I have 3 tags so i created 3 dataset and 3 x axis and 3 yaxis… But i want to show 3 y axis only if 3 tags has different units… If 3 tags has same unit… Then i have to use one y axis for all tags…
Whether i understood your reply or i am saying any wrong ? …
Please give your suggestion to find solution for my issue
Put all tags with same units in the same dataset. Put tags with different units in different dataset. I don’t think there is any other solution for the classic chart.
Move your raw data bindings to custom properties on the container or some other component. Script the construction of a merged dataset for the chart when any raw data changes.
Yes. Place the bindings that yield one tag at a time on custom properties of another component. (I usually use the chart’s container.) Use property change scripts to monitor those raw datasets and perform the merging (by unit) into datasets on the chart itself.
The merging will need to keep timestamps in the first column, and in order. You may need to use some tolerancing to get the raw data to line up on compatible timestamps.