Dynamic and static data

Hello,

I can preload the line ui-chart with a stored data from SQL and of course I can add data dynamically. But I would like to do them at the same time. Preload a static chart from database and add new data dynamically. (Short charts, just to see the difference between the old and the live chart) I have found a solution how to set the right timestamp but my chart looks weird it keeps blinking I think it re-renders the chart every time.

[{"id":"b566090c.fcf998","type":"ui_button","z":"e0a5c277.f1753","name":"","group":"f3e75316.ec407","order":1,"width":0,"height":0,"passthru":false,"label":"start (after 10 sec you can see the new chart)","tooltip":"","color":"","bgcolor":"","icon":"","payload":"open","payloadType":"str","topic":"control","x":230,"y":440,"wires":[["be1413c8.48d82"]]},{"id":"f3e75316.ec407","type":"ui_group","name":"Relative","tab":"379107b8.4087e8","order":2,"disp":true,"width":"12"},{"id":"379107b8.4087e8","type":"ui_tab","name":"Random","icon":"dashboard"}]

If you are replacing all the data (from the database) then yes it is redrawing the entire chart, and as the axes are calculated based on the data then they get redrawn as well.

Only fill it from the database once, don't keep doing it, then you can add new data on the end in the normal way.

I have tried before, the preloaded chart disappears immediately when I inject the new data.

the timestamps of the new data vs the old must be within the time span of the chart.

What message are you sending to add new data? It should just be the topic containing line series name with the value in the payload.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.