cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Displaying lots of data points in Time Series Chart

wire
4-Participant

Displaying lots of data points in Time Series Chart

Hello,

 

Is there a way to get the time series chart or the value stream feeding into it to auto adjust the number of data points to be shown? When I used the data querry in the composer, I have the option of setting max number of data points. I set it too high, mashup takes forever to load. Set it too low, the chart only draws a small portion of the line and then gives up.

 

I also noticed that the graphs in manufacturing apps work perfectly in that they auto adjust the amount of data points based on the date range. How can I do that in thingwrox composer?

 

Thanks

4 REPLIES 4
PaiChung
22-Sapphire I
(To:wire)

You can always take a date time filter. Do a count first and then decide on how many records to return and which ones.

it's a bit expensive up front though.

wire
4-Participant
(To:PaiChung)

Thank you for your response. I should have said that I am using a date time filter. I have date time pickers in the mashup that feed into the date time filter of the query. My goal is for the user to be able to pick a date range and then see a trend. Right now, if the date range is small, it works great, but as you add more time to that range, that is where the issues arise. The machine I'm monitoring is supply a new data point about every second.

 

Is there a way to implement some kind of "significant changes" filter to the query? I don't need to much detail when looking at a month of data, but would like the detail to be there if looking at an hour of data. Or some way to spread the max data points setting across the date range? For example, if max data points is 1,000, it shows up to 1,000 points for one day or one week. Right now, if I set the query to a max of 1,000 data points, it just plots the first 1,000 seconds of data points it sees and gives up on the rest, regardless of what the date range is set to.

PaiChung
22-Sapphire I
(To:wire)

There are probably a few ways you can approach this, I think the simplest way to do it would be something like.

first series is your 1000 across your time range, however you use state based formatting to highlight the points that are in an area that you would consider significant - or you publish a table / timelines with significant events

then drilling into those points or events would give you a zoomed view with more points (either a redraw or pop up)

Ascherer17
15-Moonstone
(To:wire)

You could try writing some code to filter out unneeded data points so that fewer points are given to the Time Series Chart to render.  For instance, I wrote some code that deletes "middle" points from an infotable of data.  If 3 points in a row have the same value, you delete the middle point and you will still have the first and last points to draw a line.  It takes careful infotable row manipulation.

I found that the Time Series Chart widget seems to fare better if you disable the X and Y axis 'Autoscale' attributes.  You have to give it a max and min for Y and the earliest and latest times you want to show for X.  However, this means that any data fed in outside the timestamps or out of the Y range will not be shown.  

I also found that using a separate query Service for each individual property is much more efficient for the Time Series Chart than the "QueryPropertyHistory" Service which queries each property and then merges them into a single output InfoTable.  When it does the merge, it inputs additional data points into the table which will then cause the InfoTable to attempt to draw many more points than you would expect.

Announcements


Top Tags