Graph not plotting data
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.
Same problem!
@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?
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 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.
New feature on its way...!
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.
Hey @thomastech, want to play with something? ^^
https://github.com/iangray001/ESPUI/tree/charts#charts
@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
@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
@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 I guess @iangray001 needs to comment on that, is that feature ready for pr or not ?