tttapa / ESP8266

Documentation and help with the ESP8266 chip/boards/modules
GNU General Public License v3.0
651 stars 282 forks source link

Possible creating multiple charts? #51

Open hachler opened 5 years ago

hachler commented 5 years ago

I loved too much this data logging but I would need to have around 3 different charts on the screen for my purpose project. Is it hard to add more charts in these current project? I am trying to play inside the .js files but not having lucky.

Thanks

m19858484 commented 5 years ago

Hi, I have the same questions. I create the multi CSV file, and I add multi-chart on .html, but I have no idea of how to edit the .js file.

tttapa commented 5 years ago

I don't have much time on my hands right now, and my JavaScript is quite rough, so I can't really help you.

I think the Google Chart documentation is a good place to start. Loading the CSV files from the ESP8266 is trivial, getting the data to display on the graph is harder, because of the callbacks.

You could try adding another chart in the drawChart function with the same data and options first, then duplicate the CSV loading part to display the right data, and use different options for your second chart.

Note that this is primarily a JavaScript question, so you might get more help on sites like StackOverflow.

Good luck!

m19858484 commented 5 years ago

I set different functions name in .js. Finally, it works! Thanks,

tttapa commented 5 years ago

Glad to hear!

It might be useful to others if you could post your solution.

netless-ww commented 3 years ago

I'm looking at the same problem. Any chance you could post your multi chart HTML & Jarva code M19858484? Would be much appreciated.

m19858484 commented 3 years ago

Hi netless-ww, I've placed the src code here: code.zip Hope this helps!

netless-ww commented 3 years ago

Hi 19858484 Just what I needed. Thanks!

netless-ww commented 3 years ago

Hi all

Thanks again to M19858484 for his input.

Here is my attempt at a more direct extension of Pieter P's Web Based Temperature Logging Program to Cater for two data streams.

Extension to more data streams should now be straightforward.

Hope this helps others needing to log more than 1 data stream.

ESP8266WebDatalogger.zip