Using all of Dashboard chart node

I have a solar system that runs my home controller, house wide music, alarm system, etc. I created some graphs with a chart node and thought I'd share how you can plot a lot into them. Below is the "Last 24 hour" graph. The top 2 lines are text nodes.

The lines on the graph are as follows;

cyan    - battery bank voltage (scale 10v to 15v)
pink    - solar system charge amps (0-80a but altered by X 5/80 + 10 for 10-15 scale)
grey    - the tall one is midnight, shorter ones 4hr marks (4am, 8am, etc)
red     - (horizontal) denotes 14v level
green   - (horizontal) denotes full charge level (12.6)
orange  - (horizontal) denotes AC inverter shut down voltage (plus .5v)
yellow  - (bottom) indicates the system is in solar mode (not necessarily charging)
blue    - (bottom) indicates the AC charger has been switched on by the computer
white   - (bottom) indicates sun is shining and solar system is charging the battery bank

I also have a 4 day graph as well (though due to some code work and a graph reset it is only showing ~3 days). Here I sync the 2 separate voltage and amps graphs.

As you may notice, being early Feb the solar charging is not ideal. Often the sun is not sufficient to provide any charging during the day. This lets me keep an eye on what the system has been doing to the battery bank.

Hope this maybe illuminates some new ideas for some of you.

1 Like

Do you use a specific code/trick for the horizontal lines or are you just adding static datapoints at regular intervals?

The horizontal lines are just repeated static values with a muted color.
The vertical lines are managed by clock and for one single trigger, they are set to a high value (IE: 15v for midnight), but the rest of the time the value is anything below the lowest value on the scale, or even just zero.

Below is the graph feed that always occurs (3 outputs, 1 & 3 feed other nodes, 2 is the graph). Just need to manage the values as you require. I do control the output to the graph via clock (not upon msg.payload). The latest msg.payload graph value(s) (voltage, amps) are held in context (but they are updated each second). I found setting colors is a tad tricky (which feed is what color).

For example, if the ac_charge line (blue) should show, it is set to 10.5v while the slr_charge line (yellow) is then set to below 10v. This gives an illusion of the line color changing.

return [ null, [voltage, highline, baseline, badline, midnite, ac_charge, slr_charge, sun_line, amps], voltage ];

thanks for the awesome information.