How can I not upload all the data on time series chart?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
How can I not upload all the data on time series chart?
I have a property called temperature, and all the data is saved in a value stream. Whenever I want to display this data in mashup I use 'time-series chart' . Now, this chart displayes all the 500 values from my data. how can I only display every 5th value like (5,10,15......) so that I know the pattern of temperature but not all the temperature on the graph.
- Labels:
-
Connectivity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I've never done this but you could try using Interpolate which is part of InfoTable functions it is meant to give you a smooth graph which means that the values returned wouldn't be the actual values, but it would give you the ability to limit the number of points returned over a period of time.
Else you would have to get all the records you want in a wrapper service and then pull out every fifth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can create a custom service that queries every 5th value and then use that filtered data in your time series chart.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey Polina, can you explain in a little more detail how can I do that?
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Which service are you using right now to populate your Time series chart?
You'd have to write a code to filter all received values to display only each 5th. There are multiple ways to implement such a requirement. One of the solutions would be querying entries by the primary key incremented by 4 until the end of results. You may also fetch all data first and then go through it selecting only each 5th and putting it in the infotable. Regardless of how you decide to implement, the result/output would be an infotable type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Primary key may not work, because you could be having data for multiple sources in the same Stream, I believe the id of the stream is just a simple increasing number irregardless of source.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hey, I get your point so this is what is happening, even if I write the code as the values keep on adding in value stream the number for those values will keep on changing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Right so instead of using the Key, you can get the records then based on the length determine how many you are going to grab and just grab them by using
var rowIWant = AllRows.rows(i) (I think it is parenthesis vs. square brackets)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I understand what you are saying but I am new with Thingworx can you explain me a little more in detail how to do it?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Currently I am suring Query property History to display myy values
