Cumulated bars

89 views
Skip to first unread message

Invisible Man

unread,
Oct 6, 2020, 6:49:48 PM10/6/20
to weewx-user
Hello,

In Weewx, is it possible to generate a graph with cumulated bars? For example, for year's rain, you'd see rain in January, then rain of January + February, then rain of January + February + March etc.

In skin.conf,  I see this config. But tweaking the aggregate interval won't help me, because it won't sum the previous months... And plot_type only has bar, line or vector available.

So, is this possible ?
Thanks

[[[yearrain]]]
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = sum
                # aggregate_interval = 2629800 # Magic number: the length of a nominal month
                aggregate_interval = 604800    # == 1 week
                label = Rain (weekly total)

Tom Keffer

unread,
Oct 6, 2020, 11:40:39 PM10/6/20
to weewx-user
Try 

 aggregate_type = cumulative




--
You received this message because you are subscribed to the Google Groups "weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/4cd03028-e945-47b6-8b78-9cca1b22711fn%40googlegroups.com.

Invisible Man

unread,
Oct 7, 2020, 8:42:45 PM10/7/20
to weewx-user
Hmmm... looks like it doesn't change anything... ?

       [[[yearrain]]]
            yscale = None, None, 0.02
            plot_type = bar
            [[[[rain]]]]
                aggregate_type = cumulative

                # aggregate_interval = 2629800 # Magic number: the length of a nominal month
                aggregate_interval = 604800    # == 1 week
                label = Rain (weekly total)

Tom Keffer

unread,
Oct 7, 2020, 10:13:06 PM10/7/20
to weewx-user
Are you sure you are looking at a new image? Images do not get refreshed any longer than their aggregation interval, which, in this case, would be once a week.

Delete the image, wait for the next reporting cycle.

Invisible Man

unread,
Oct 8, 2020, 8:42:14 PM10/8/20
to weewx-user
It works ! Indeed it had not been refreshed !

Now next question : the year grouping is for the last 12 months. Is there a way to get only data for a given year ?, e.g 2020. So if I'm in October, that'll be only 10 months of cumulated data.

Tom Keffer

unread,
Oct 8, 2020, 9:04:42 PM10/8/20
to weewx-user
No. You'd have to either create a WeeWX extension that calculates year-to-date rain and puts it in the database as a separate type, or create an xtypes extension.

Invisible Man

unread,
Oct 9, 2020, 4:57:07 PM10/9/20
to weewx-user
Ok thanks again for your very precise answers!

-- Axelle
Reply all
Reply to author
Forward
0 new messages