ESPUI icon indicating copy to clipboard operation
ESPUI copied to clipboard

Graph not plotting data

Open Tyson-Costa opened this issue 4 years ago • 10 comments

I have been really enjoying ESPUI, and have been trying to implement the graph into my system. I have been having an issue where the graph will not add any points, and won't show the axes as well. I can only see the graph title.

Besides with my code, I have tried with the gui.ino example, and I see that the graph works. However, if I attempt to make any changes to this example code (such as removing a slider, for example), the graph displays the same behaviour as I mentioned above - not adding any data points or displaying the axes.

Is this an error with the library, or am I missing something with the implementation? To re-create this problem just try and modify the gui.ino example by removing a widget and observing if the graph still works.

Thank you for the help.

Tyson-Costa avatar Jul 28 '21 11:07 Tyson-Costa

Same problem!

Lagodish avatar Sep 02 '21 00:09 Lagodish

@s00500 I think you'd likely agree that the chart component is very much a work-in-progress. I propose that rather than build a one, I put together a branch that integrates something like chart.js. I've used it before and it works well. Any objections?

iangray001 avatar Feb 02 '22 21:02 iangray001

Hey Ian, no objections, the real question here was where the data should be stored.... on the esp or in the localstorage of the browser... when using external libraries the only question is the amount of space you can fit them into, we do not necessarily ship lots of unused js :-)

s00500 avatar Feb 03 '22 09:02 s00500

@s00500 I think you'd likely agree that the chart component is very much a work-in-progress. I propose that rather than build a one, I put together a branch that integrates something like chart.js. I've used it before and it works well. Any objections?

This chart.js is great. please integrate it or guide me how to do it. Historical data is very important for decision making and other tasks for iot projects.

garudaonekh avatar Mar 19 '22 07:03 garudaonekh

New feature on its way...!

Screenshot 2022-04-02 at 20 57 27

In the end I decided not to use chart.js because its codebase is too massive, but I found a lightweight charting library (Chartist) that works nicely.

Just got to sort out a few bits and bobs.

iangray001 avatar Apr 02 '22 20:04 iangray001

Hey @thomastech, want to play with something? ^^

https://github.com/iangray001/ESPUI/tree/charts#charts

iangray001 avatar Apr 21 '22 20:04 iangray001

@iangray, That is cool! I'll try it out soon. My project could use a VU meter and maybe a single Bar Chart control can be used to do that.

BTW, I recently released my ESPUI powered project. I never resolved the randomly dropped Websocket connection issue; that's a problem to tackle on another day. My road-rashed brain needs a rest / reset.

BTW, here's what ESPUI is doing for my project: https://github.com/thomastech/PixelRadio

ESPUI screen shots can be found here: https://github.com/thomastech/PixelRadio/blob/main/docs/User_Manual/Overview.md

Just call me a very satisfied ESPUI user. Your fixes and additions are greatly appreciated. And of course @s00500 deserves extra special recognition too. :)

  • Thomas

thomastech avatar Apr 21 '22 21:04 thomastech

@iangray001 is it planned to merge your chart implementation from your fork into the repository of @s00500 ? By now, the repository of @s00500 is >50 commits ahead of the chart branch of your fork. On the other hand it seems that your chart implementation is further than in the main repository.

thanks Sven

dewenni avatar Jan 15 '23 09:01 dewenni

@s00500 Is there a problem with @iangray001 s implementation of chartist? Do you want to stick to a "native" chart implementation? I would like to help getting Chart and Gauge running in ESPUI but I don't know what your desired direction is.

Andy1978 avatar Feb 26 '24 11:02 Andy1978

@Andy1978 I guess @iangray001 needs to comment on that, is that feature ready for pr or not ?

s00500 avatar Feb 26 '24 11:02 s00500