Skip to main content
1-Visitor
December 14, 2017
Question

How can I not upload all the data on time series chart?

  • December 14, 2017
  • 9 replies
  • 3951 views

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.

9 replies

22-Sapphire I
December 14, 2017

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.

20-Turquoise
December 14, 2017

You can create a custom service that queries every 5th value and then use that filtered data in your time series chart.

kt11-VisitorAuthor
1-Visitor
December 14, 2017

Hey Polina, can you explain in a little more detail how can I do that?

Thanks in advance!

20-Turquoise
December 14, 2017

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.