Multigraph with realtime updates

Hi.

I'm checking the code of realtime and multigraph visualizations.

Is it very hard to create a realtime multigraph? Has anyone done that or thought about that?

By realtime multigraph I mean a multigraph visualization that auto updates like the realtime one.

I've made some search but don't seem to find anything related.

Cheers.

CidiRome's picture

Re: Multigraph with realtime updates

Hi.

I managed to make some changes in the javascript so it updates like the realtime graph.

I haven't take to long correcting some bugs that I know now exist with the zoom in/out and forward/back buttons as I normally don't use them (I thought of removing this buttons but they can still be usefull).

If someone think the code is useful I can publish it, but anyone with basic javascript knowledge can do it.

Cheers.

 

pb66's picture

Re: Multigraph with realtime updates

I would be interested to see how it's done, It would be a really good feature for emoncms to have, perhaps it could find it's way into the source code.

Paul

CidiRome's picture

Re: Multigraph with realtime updates

Hi.

My changes to the file emoncms\Modules\vis\visualisations\multigraph\multigraph.js

can be downloaded from:

https://vieirasoft.net/multigraph.js

I'm sure the code is not very professional but it is doing the job (except for the part I refered)

Cheers.

pb66's picture

Re: Multigraph with realtime updates

Thanks, I will need to do a side by side comparison to recognize the changes as I'm not familiar with js or the original code, so I'm not really qualified to comment on the coding. But unless there is a reason multigraphs shouldn't update in realtime hopefully someone in the know will take a look too.

Paul

CidiRome's picture

Re: Multigraph with realtime updates

If necessary I can explain the changes I've made, but if I was able understand how the original code works (at least enough to make the changes), the original coder will be able to understand my changes and improve them.

About the bugs I know the code still have, I believe that what is necessary is to stop the timeout when the zoom in/out and forward/back buttons are used and start it again when the time interval buttons are pressed again, and/or maybe add a checkbox that activates/deactivates the realtime update.

With time I can do that changes, but now I'm trying to build my own CT sensor circuit to activate a relay when current is higher than a set value using scrap parts so my mind is elsewhere.

Cheers.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.