I am having an issue with resizing the Y-Axis of TimeSeriesChart
when new datasets are written to the chart's props.series[0].data
property.
Issue
Ignition 8.1.21
My TimeSeriesChart
instances only rescale the Y-axis on mouse-over.
Edit It seems like the Y-Axis rescale issue may only be affecting TimeSeriesCharts
whose dataset is returned from a Named Query
, and that the charts receiving their dataset from system.tag.queryTagHistory
may not have this issue. Some of the values from my Named Query
can be null, so I set their value to zero before writing to the props.series[0].data
property, but this doesn't explain the issue to me.
Attempted Solutions
I left the TimeSeriesChart.props.plots[0].axes[0].min
and max
property blank, as the docs say this will trigger an auto-scale of the Y-Axis, but this also only adapts the rendered chart on mouse-over.
Description
I am using a single Flex Repeater
whose instances are dynamically changed based on navigation button clicks. The instances in the Flex Repeater
are views that contain a TimeSeriesChart
When a button is clicked, a Message
is sent whose payload parameterizes the custom properties of the TimeSeriesChart
s.
Based on that payload, either a system.db.runNamedQuery
or system.tag.queryTagHistory
call is made, I do stuff with the returned dataset, then write to the TimeSeriesChart.props.series[0].data
property.
I also write to the TimeSeriesChart.props.plots[0].axes[0].min
and max
property, because I have operator-set markers on the chart that may be outside the min/max of the dataset. I want the customer to be able to see that the charted variable is not within the high, low, target markers.
So on the first access of the page with this Flex Repeater
, the Flex Repeater
is rendered and then its instances are changed with further buttons.
I have tested all this stuff for a week and all of the data redirection for getting the proper datasets to the chart, updating chart labels, etc. works. It's just this issue where the chart will not re-size the Y-Axis until mouse-over.
Thank you for any assistance.