Good Morning. The hours of sunshine work well. Now I wanted to ask if I can change the width of the bars? Every attempt so far failed.
[image: daysun.png] Likewise, the link above is now the name of the Wm / 2. Is it possible to change or suppress this? Here is my code: [[[daysun]]] # Make sure the y-axis increment is at least 0.02 for the sun plot yscale = 0.0, 1.0, 0.1 plot_type = bar [[[[sunshine_hours]]]] aggregate_type = sum aggregate_interval = 3600 label = Sonnenschein in Stunden (Stundentotal) Thanks for Help Am Dienstag, 23. Juli 2019 21:05:35 UTC+2 schrieb Stefan: > > Hello Andrew. > > Yes you are right. Of course it is true: > > #set hours = int ($ day.sunshine_hours.sum.raw) > #set minutes = int (($ day.sunshine_hours.sum.raw - $ hours) * 60 + 0.5) > <sun value = "$ hours h $ minutes m" /> > > That's how it works perfectly. Now I will try to show it as a graphic. > > Thank you diligent helpers > > Am Dienstag, 23. Juli 2019 14:18:15 UTC+2 schrieb Andrew Milner: >> >> Stefan >> You need to forget $current.sunshine_hours.raw as that will only give you >> the sunshine in the interval which will always be either 0 or 5 in your >> case. >> >> For the daily total you need to use $day.sunshine_hours.sum in order to >> get the total sunshine hours for the day from midnight up to the current >> time. >> >> >> >> >> >> On Tuesday, 23 July 2019 15:09:06 UTC+3, Stefan wrote: >>> >>> Hello Thomas. >>> >>> I found the mistake. When we create the new table, we use the name >>> weewx.sdb_new instead of the weewx.sdb. Have this now adjusted in the >>> weewx.conf and lo and behold, num works it. The rest I had done, but >>> unfortunately not this detail. Many thanks to all helpers. Class like >>> that works. >>> >>> Your code also works great: >>> #set hours = int ($ current.sunshine_hours.raw) >>> #set minutes = int (($ current.sunshine_hours.raw - $ hours) * 60 >>> + 0.5) >>> <sun value = "$ hours h $ minutes m" /> >>> >>> Many Thanks >>> >>> Am Dienstag, 23. Juli 2019 13:09:25 UTC+2 schrieb Thomas Keffer: >>>> >>>> The type "sunshine_hours" is not in your database. It will work with >>>> "$current" because you have a current record, so weewx is using that. But, >>>> because it is not in your database, weewx cannot sum over the day. >>>> >>>> See the section *Adding a new type to the database >>>> <http://weewx.com/docs/customizing.htm#add_archive_type>* in the >>>> Customizing Guide for how to do this. >>>> >>>> -tk >>>> >>>> >>>> On Tue, Jul 23, 2019 at 4:00 AM Stefan <sschn...@bluewin.ch> wrote: >>>> >>>>> This is with $current.sunshine_hours.raw. It works! >>>>> >>>>> <solar> >>>>> <solar value="861"/> >>>>> <solar_max value="861"/> >>>>> <solar_max_time value="12:51"/> >>>>> <sun value="0.0833333333333"/> >>>>> </solar> >>>>> >>>>> But with $day.sunshine_hours.raw or $day.sunshine_hours.sum.raw or >>>>> $day.sunshine_hours.raw.sum >>>>> The Problem always turns up when replacing $current by $day. >>>>> >>>>> >>>>> >>>>> Am Dienstag, 23. Juli 2019 08:35:37 UTC+2 schrieb gjr80: >>>>>> >>>>>> The answer is in the error message. You are using >>>>>> $day.sunshine_hours.raw, you should be using $day.sunshine_hours.sum or >>>>>> perhaps $day.sunshine_hours.sum.raw >>>>>> >>>>>> Gary >>>>>> >>>>> -- >>>>> 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...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/weewx-user/5ddf5a22-a565-4e12-9093-5c69d187e420%40googlegroups.com >>>>> >>>>> <https://groups.google.com/d/msgid/weewx-user/5ddf5a22-a565-4e12-9093-5c69d187e420%40googlegroups.com?utm_medium=email&utm_source=footer> >>>>> . >>>>> >>>> -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/b2ed1a86-18d0-4851-86b4-6f61c224868c%40googlegroups.com.