Community Tip - Stay updated on what is happening on the PTC Community by subscribing to PTC Community Announcements. X
I am using Time Series Chart, InfluxDB, and Value Stream. What I am doing is to use QueryPropertyHistory to have 1 hour data from InfluxDB to fill the Time Series Chart. The QueryProperyHistory is commanded periodically. The speed is really slow for the Chart to update. Does anyone know if there are any solutions on this? Maybe a cart with cache can help?
Solved! Go to Solution.
The out of the box TWX time series chart widget is notorious for poor performance when attempting to render that many data points. You can either look to a more efficient third party charting library like Plotly or run your data through the Interpolate service (infotable snippet) to reduce the number of data points.
The BEST option, provided you have direct access to your instance of Influx, is to resample your data. You can do this either on the fly or as part of some DB job that continuously maintains a subset of your data in another table. Whichever strategy you choose, there is no reason to render 13,000 data points. A resampling strategy will allow you to visualize your data within the specified time period. As your time period gets smaller and more precise you can then look to bring in data from the value stream. In your specific scenario, if one hour is approx 13k worth of data points, I wouldn't want to see the data in full granularity until I was looking at a time frame of only a few minutes.
How many points are you pulling?
I am pulling one hour data. It's around 13498 rows of data. The size is around 1.5MB. So It should make sense for this size of data. I am just wondering if there is some solution to let the chart refresh look more smoothly and fast. For example the old data is cached and only the new data is queried. Or do you know how can I query only specific fields but not all fields from InfluxDB?
The out of the box TWX time series chart widget is notorious for poor performance when attempting to render that many data points. You can either look to a more efficient third party charting library like Plotly or run your data through the Interpolate service (infotable snippet) to reduce the number of data points.
The BEST option, provided you have direct access to your instance of Influx, is to resample your data. You can do this either on the fly or as part of some DB job that continuously maintains a subset of your data in another table. Whichever strategy you choose, there is no reason to render 13,000 data points. A resampling strategy will allow you to visualize your data within the specified time period. As your time period gets smaller and more precise you can then look to bring in data from the value stream. In your specific scenario, if one hour is approx 13k worth of data points, I wouldn't want to see the data in full granularity until I was looking at a time frame of only a few minutes.
Thanks very much for your comments. I will look into the solutions.
I believe some 'down sampling' type of functionality is also coming into some of the Thingworx charts, not sure what the release date is going to be.
That's a good news. Hopefully it will come soon.