Generating graph with multi colored background bands or multiple colors in the graph line

50 views
Skip to first unread message

Rahul Bedi

unread,
Jun 29, 2020, 2:57:01 AM6/29/20
to weewx-user
Hi,

I am have integrated the AQI and PurpleAir extensions on my weather station and am now trying tweak the graphs generated.

Is there a way to have the Weewx imagegenerator to do one of the following:

1. Generate a graph with the background with horizontal bands of different color based on the value of the y-axis labels ? Eg. 0-50 Green; 51-100: Light green; 101-150: pink etc.

or

2. Generate a graph where the line segments change color depending on the y-axis value. So basically one line but having different colored segments depending on the rang of Y-axis values.

Thanks.

- Rahul

gjr80

unread,
Jun 29, 2020, 3:42:45 AM6/29/20
to weewx-user
Hi,

No, unfortunately the WeeWX image generator cannot do that. You might be able to achieve such an effect using a 3rd party charting package such as Highcharts.

Gary

Rahul Bedi

unread,
Jun 29, 2020, 4:22:57 AM6/29/20
to weewx...@googlegroups.com
Thanks.

Is there a way to incorporate the generated graph into a Seasons template ?

- Rahul

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/c3FLmNFDBw0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/4b131290-4c6b-4054-af90-ca932cddd896o%40googlegroups.com.

gjr80

unread,
Jun 29, 2020, 4:49:59 AM6/29/20
to weewx-user
I presume you mean incorporating 3rd party charts such as Highcharts. Simple answer is yes, basically if you can put it in a HTML page you can put it in a Seasons page.

In general you need to have WeeWX produce whatever data the charting package requires, that could be as simple as a JSON format data file produced via a WeeWX report or it could be something more complex. You would need to put the necessary HTML/JavaScript/PHP code required by the charting package to render the chart in the correct Seasons template file. All fairly straightforward but can be quite involved depending on your skills. Certainly much more involved than adding an additional WeeWX image generator generated plot.

Gary

Reply all
Reply to author
Forward
0 new messages