nophead/EnviroPlusWeb

Feature Request - Separate graphs

Opened this issue · 1 comments

Hi nophead,
A very nice webpage you created for the Enviroplus. All running on the Pi itself.

I run you code for a year now, but like to be able to view the values in separate graphs.
Have been editing your code, but fail to succeed.
For instance when I want to remove the fan part:

<!--
<tr><td><label` for="fan">Fan:</label></td>
                <td><input id="fan" type="number" min="0" max="100" step="5" value="100" size="3" name="fan"></td>
                        </tr>
-->

)
The graph and legend isn't showing anymore?!

But the hardest part is still to come. setting every value in a separate tab / graph with the appropriate scale.
Testing this by repeating the:

<td><canvas id="canvas" height="480" width="640"></canvas><br><br>
        <table><tr id = "legend"></tr><tr id = "range"></tr></table>
    </td>

part isn't doing the trick.

As you can see, my javascript/HTML isn't that good.
Can you maybe give me some tips?

Removing the fan code probably fails because the javascript uses the "fan" label to find the fan setting and sends it in the page request url. You would have to change the Javascript to not reference the label.

I have no idea how to do tabbed pages in HTML / javascript. A quick Google finds this: https://www.w3schools.com/howto/howto_js_full_page_tabs.asp