# This is the Belchertown skin charting system which utilizes Highcharts to display the chart data.
#
# PLEASE READ THE CHARTS WIKI! A lot of information is there and it will help you! 
# It is located here: https://github.com/poblabs/weewx-belchertown/wiki/Belchertown-Charts-Documentation
#   
# Caution!
# The more charts you have, the slower things can become. This is especially true at the YEAR level. These are interactive charts which have to build plot points from the database on every archive interval. This could result in large file sizes to generate, and for your website visitors to download. You're welcome to customize as many charts as you want, but be warned things could slow down if you do too much!
# The defaults in this skin have proven to be a good baseline for the number of charts and options without overwhelming your system. 
#
# Overview of options:
# A timespan refers to "day", "week", "month" or "year". 
# The first configuration item is the graph group, such as [day], [week], [month], [year] sections. 
# The charts are defined under the graph group and can be renamed and reorganized. They will display on your website in the order they appear here.
# Under the chart are the observation names from the WeeWX database. Any item within your database "archive type" can be charted. For a list of "archive types" refer to this chart. http://weewx.com/docs/customizing.htm#archive_types
# Each observation can be customized with built-in Highcharts "series" options. Popular ones are color, name and zIndex. For a list of Highcharts Series options refer to https://api.highcharts.com/highcharts/series 
#
# If a custom option broke your charts:
# Undo your change and run wee_reports. You do not need to restart weewx if you make a graphs.conf change.
# If that doesn't work, undo ALL changes and go back to the default graphs.conf.example configuration.
# There is no guarantee that every customization option will work. 
#
# Detailed settings overview can be found in the wiki under Detailed Configuration Settings Overview
#
###############################################################################

# Global Chart Defaults
# These are fallback options that charts will use if an option is not defined. 
aggregate_type = None
time_length = 90000 # Last 25 hours
type = line
colors = "#7cb5ec, #b2df8a, #f7a35c, #8c6bb1, #dd3497, #e4d354, #268bd2, #f45b5b, #6a3d9a, #33a02c"
tooltip_date_format = "LLL"

[homepage]
    # Chart Timespan Defaults
    title = "Homepage"
    show_button = true
    button_text = "Homepage"
    time_length = today
    tooltip_date_format = "LLL"
    gapsize = 300 # This should be your archive_interval from weewx.conf
   
    [[chart1]]
        title = Temperature
        width = 100%
        [[[outTemp]]]
            zIndex = 1
            name = Temperature
        [[[windchill]]]
        [[[heatindex]]]
            color = "#f7a35c"
        [[[dewpoint]]]
            color = purple
    
    [[chart5]]
        width = 100%
        title = Out Humidy
        [[[outHumidity]]]


    [[chart2]]
        # The combined Wind Chart works best in this configuration
        title = Wind Speed and Direction
        yAxis_min = 0
        width = 100%
        [[[windDir]]]
            zIndex = 2
            yAxis = 1
            yAxis_max = 360
            lineWidth = 0
            [[[[marker]]]]
                enabled = true
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0
        [[[windGust]]]
            zIndex = 1
        [[[windSpeed]]]
            type = area
 

   
    [[chart3]]
        title = Rain
        width = 100%
        [[[rainRate]]]
            yAxis = 1
        [[[rainTotal]]]
            name = Rain Total
    
    [[rainyeartotals]]
        type = column
        time_length = all
        aggregate_type = max
        aggregate_interval = 86400 # 1 day
        title = Historical Rain Totals By Year
        xAxis_groupby = year
        [[[rainTotal]]]
            name = Rain Total

    [[chart4]]
        title = Barometer
        type = spline
        [[[barometer]]]
            color = "#BECC00"
            yAxis_tickinterval = 0.01
            
    [[roseplt]]
        title = Wind Rose
        [[[windRose]]]

    [[exampleChart]]
        title = Wind Speed Today
        time_length = today
        [[[haysChart]]]
            color = "#ff4500"
            yAxis_softMax = 25
            width = 100%

    [[avgclimate2024]]
        title = "Dati meteoclimatici - medie mensili 2024"
        #subtitle = "Ultimi 12 mesi"
        type = spline
        width = 100%
        #time_length = year_specific
        #year_specific = 2023
        #time_length = day_ago_to_now
        #time_ago = 420
        #aggregate_interval = month
        #yAxis_label = "Temperaturen"
        #start_at_midnight = true
        #start_at_beginning_of_month = true
        #tooltip_date_format = "MMMM YYYY"
        #gapsize = 86400000 # 1 day in microseconds
        #type = spline
        time_length = year_specific
        year_specific = 2024
        aggregate_type = max
        aggregate_interval = 86400 # 1 day
        gapsize = 86400000
        xAxis_groupby = month
        xAxis_categories = 'Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'

        [[[rain]]]
            aggregate_type = sum
            type = column
            zIndex = 0
            color = "#6495ed"
            yAxis = 1
            yAxis_label = "Regen (mm)"
        [[[outTemp_min]]]
            observation_type = outTemp
            aggregate_type = min
            name = "Temperatur (min)"
            zIndex = 2
            color = "#173c6a"
            [[[[marker]]]]
                enabled = true
                radius = 4
        [[[outTemp_avg]]]
            observation_type = outTemp
            aggregate_type = avg
            name = "Temperatur (&#8709;)"
            zIndex = 2
            color = "#b2df8a"
            [[[[marker]]]]
                enabled = true
                radius = 4
        [[[outTemp_max]]]
            observation_type = outTemp
            aggregate_type = max
            name = "Temperatur (max)"
            zIndex = 2
            color = "#fc0404"
            [[[[marker]]]]
                enabled = true
                radius = 4


    [[avgclimate2023]]
        title = "Dati meteoclimatici - medie mensili 2023"
        width = 100%
        type = spline
        time_length = year_specific
        year_specific = 2023
        aggregate_type = max
        aggregate_interval = 86400 # 1 day
        gapsize = 86400000
        xAxis_groupby = month
        xAxis_categories = 'Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'
        [[[outTemp]]]
            zIndex = 2
            name = Max Temperature
            color = red
        [[[outTemp_min]]]
            name = Min Temperature
            observation_type = outTemp
            aggregate_type = min
            zIndex = 2
        [[[outTemp_avg]]]
            name = Avg Temperature
            observation_type = outTemp
            aggregate_type = avg
            zIndex = 2
        [[[rainTotal]]]
            name = Rain Total
            type = column
            yAxis = 1
            zIndex = 0
            color = "#268bd2"

    [[avgclimate2022]]
        title = "Dati meteoclimatici - medie mensili 2022"
        width = 100% 
        type = spline
        time_length = year_specific
        year_specific = 2022
        aggregate_type = max
        aggregate_interval = 86400 # 1 day
        gapsize = 86400000
        xAxis_groupby = month
        xAxis_categories = 'Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'
        [[[outTemp]]]
            zIndex = 2
            name = Max Temperature
            color = red
        [[[outTemp_min]]]
            name = Min Temperature
            observation_type = outTemp
            aggregate_type = min
            zIndex = 2
        [[[outTemp_avg]]]
            name = Avg Temperature
            observation_type = outTemp
            aggregate_type = avg
            zIndex = 2
        [[[rainTotal]]]
            name = Rain Total
            type = column
            yAxis = 1
            zIndex = 0
            color = "#268bd2"

   [[avgclimate2021]]
        title = "Dati meteoclimatici - medie mensili 2021"
        width = 100%
        type = spline
        time_length = year_specific
        year_specific = 2021
        aggregate_type = max
        aggregate_interval = 86400 # 1 day
        gapsize = 86400000
        xAxis_groupby = month
        xAxis_categories = 'Gen', 'Feb', 'Mar', 'Apr', 'Mag', 'Giu', 'Lug', 'Ago', 'Set', 'Ott', 'Nov', 'Dic'
        [[[outTemp]]]
            zIndex = 2
            name = Max Temperature
            color = red
        [[[outTemp_min]]]
            name = Min Temperature
            observation_type = outTemp
            aggregate_type = min
            zIndex = 2
        [[[outTemp_avg]]]
            name = Avg Temperature
            observation_type = outTemp
            aggregate_type = avg
            zIndex = 2
        [[[rainTotal]]]
            name = Rain Total
            type = column
            yAxis = 1
            zIndex = 0
            color = "#268bd2"

        [[radialChartName24]]
            time_length = year_specific
            year_specific = 2024
            width = 100%
            title = min-max 2024
            css_class = "weatherRadial"
            [[[weatherRange]]]
                range_type = outTemp

        [[radialChartName23]]
            time_length = year_specific
            year_specific = 2023
            width = 100%
            title = min-max 2023
            css_class = "weatherRadial"
            [[[weatherRange]]]
                range_type = outTemp

        [[radialChartName22]]
            width = 100%
            time_length = year_specific
            year_specific = 2022
            title = min-max 2022
            css_class = "weatherRadial"
            [[[weatherRange]]]
                range_type = outTemp

        [[radialChartName21]]
            width = 100%
            time_length = year_specific
            year_specific = 2021
            title = min-max 2021
            css_class = "weatherRadial"
            [[[weatherRange]]]
                range_type = outTemp




[day]
    # Chart Timespan Defaults
    title = "Today"
    show_button = true
    button_text = "Day"
    time_length = today
    tooltip_date_format = "LLL"
    gapsize = 300 # This should be your archive_interval from weewx.conf

    [[chart1]]
        title = Temperature
        [[[outTemp]]]
            zIndex = 1
            name = Temperature
        [[[windchill]]]
        [[[heatindex]]]
            color = "#f7a35c"
        [[[dewpoint]]]
            color = purple
    
    [[chart2]]
        # The combined Wind Chart works best in this configuration
        title = Wind Speed and Direction
        yAxis_min = 0
        [[[windDir]]]
            zIndex = 1
            yAxis = 1
            yAxis_max = 360
            lineWidth = 0
            [[[[marker]]]]
                enabled = true
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0
        [[[windGust]]]
        [[[windSpeed]]]
            zIndex = 2
    
    [[chart3]]
        title = Rain
        [[[rainRate]]]
            yAxis = 1
        [[[rainTotal]]]
            name = Rain Total
    
    [[chart4]]
        title = Barometer
        type = spline
        [[[barometer]]]
            color = "#BECC00"
            
    [[roseplt]]
        title = Wind Rose
        [[[windRose]]]

    [[chart5]]
        title = Out Humidy
        [[[outHumidity]]]

    [[exampleChart]]
        title = Wind Speed Today
        time_length = today
        [[[haysChart]]]
            color = "#ff4500"
            yAxis_softMax = 25
            width = 100%


[week]
    # Chart Timespan Defaults
    title = "This Week"
    show_button = true
    button_text = "Week"
    time_length = 604800 # Last 7 days
    tooltip_date_format = "LLLL"
    aggregate_type = max
    aggregate_interval = 3600 # 1 hour
    gapsize = 3600 # 1 hour in seconds

    [[chart1]]
        title = Temperature
        [[[outTemp]]]
            zIndex = 1
            name = Temperature
        [[[windchill]]]
        [[[heatindex]]]
            color = "#f7a35c"
        [[[dewpoint]]]
            color = purple
    
    [[chart2]]
        # The combined Wind Chart works best in this configuration
        title = Wind Speed and Direction
        yAxis_min = 0
        [[[windDir]]]
            zIndex = 1
            yAxis = 1
            yAxis_max = 360
            lineWidth = 0
            # Here we can override the timespan default aggregate type with our own specific to this chart
            aggregate_type = avg
            [[[[marker]]]]
                enabled = true
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0
        [[[windGust]]]
        [[[windSpeed]]]
            zIndex = 2
    
    [[chart3]]
        title = Rain
        [[[rainRate]]]
            yAxis = 1
        [[[rainTotal]]]
            name = Rain Total
    
    [[chart4]]
        title = Barometer
        aggregate_type = avg
        [[[barometer]]]
            color = "#BECC00"

    [[roseplt]]
        title = Wind Rose
        [[[windRose]]]

    [[chart5]]
        title = Out Humidy
        [[[outHumidity]]]
        
[month]
    # Chart Timespan Defaults
    title = "This Month"
    show_button = true
    button_text = "Month"
    type = spline
    time_length = 2592000 # Last 30 days
    tooltip_date_format = "dddd LL"
    aggregate_type = max
    aggregate_interval = 86400 # 1 day
    gapsize = 86400 # 1 day in seconds

    [[chart1]]
        title = Temperature
        [[[outTemp]]]
            zIndex = 1
            name = Max Temperature
            color = red
        [[[outTemp_min]]]
            name = Min Temperature
            observation_type = outTemp
            aggregate_type = min
            color = "#7cb5ec"
    
    [[chart2]]
        # The combined Wind Chart works best in this configuration
        title = Wind Speed and Direction
        yAxis_min = 0
        [[[windDir]]]
            zIndex = 1
            yAxis = 1
            yAxis_max = 360
            lineWidth = 0
            # Here we can override the timespan default aggregate type with our own specific to this chart
            aggregate_type = avg
            [[[[marker]]]]
                enabled = true
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0
        [[[windGust]]]
        [[[windSpeed]]]
            zIndex = 2
    
    [[chart3]]
        title = Rain
        type = line
        [[[rainRate]]]
            yAxis = 1
        [[[rainTotal]]]
            name = Rain Total
    
    [[chart4]]
        title = Barometer
        aggregate_type = avg
        [[[barometer]]]
            color = "#BECC00"
        
    [[roseplt]]
        title = Wind Rose
        [[[windRose]]]

    [[chart5]]
        title = Out Humidy
        [[[outHumidity]]]

[year]
    # Chart Timespan Defaults
    title = "This Year"
    show_button = true
    button_text = "Year"
    type = spline
    time_length = year
    tooltip_date_format = "dddd LL"
    aggregate_type = max
    aggregate_interval = 86400 # 1 day
    gapsize = 86400 # 1 day in seconds

    [[chart1]]
        title = Temperature
        [[[outTemp]]]
            zIndex = 1
            name = Max Temperature
            color = red
        [[[outTemp_min]]]
            name = Min Temperature
            observation_type = outTemp
            aggregate_type = min
            color = "#7cb5ec"
    
    [[chart2]]
        # The combined Wind Chart works best in this configuration
        title = Wind Speed and Direction
        yAxis_min = 0
        [[[windDir]]]
            zIndex = 1
            yAxis = 1
            yAxis_max = 360
            lineWidth = 0
            # Here we can override the timespan default aggregate type with our own specific to this chart
            aggregate_type = avg
            [[[[marker]]]]
                enabled = true
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0
        [[[windGust]]]
        [[[windSpeed]]]
            zIndex = 2
    
    [[chart3]]
        title = Rain
        type = line
        [[[rainRate]]]
            yAxis = 1
        [[[rainTotal]]]
            name = Rain Total
    
    [[chart4]]
        title = Barometer
        aggregate_type = avg
        [[[barometer]]]
            color = "#BECC00"
        
    [[roseplt]]
        title = Wind Rose
        [[[windRose]]]

    [[chart5]]
        title = Out Humidy
        [[[outHumidity]]]

[yesterday]
    # Chart Timespan Defaults
    title = Yesterday
    show_button = true
    button_text = Yesterday
    time_length = days_ago
    time_ago = 1
    gapsize = 300000

    [[chart1]]
        title = Temperature
        [[[outTemp]]]
            zIndex = 1
            name = Temperature
        [[[windchill]]]
        [[[heatindex]]]
            color = "#f7a35c"
        [[[dewpoint]]]
            color = purple

    [[chart2]]
        # The combined Wind Chart works best in this configuration
        title = Wind Speed and Direction
        yaxis_min = 0
        [[[windDir]]]
            zIndex = 1
            yAxis = 1
            yaxis_max = 360
            lineWidth = 0
            [[[[marker]]]]
                enabled = true
            [[[[states]]]]
                [[[[[hover]]]]]
                        lineWidthPlus = 0
        [[[windGust]]]
        [[[windSpeed]]]
            zIndex = 2
            #type = area

    [[chart3]]
        title = Rain
        [[[rainRate]]]
            yAxis = 1
        [[[rainTotal]]]
            name = Rain Total

    [[chart4]]
        title = Barometer
        type = spline
        [[[barometer]]]
            color = "#BECC00"
            yAxis_tickInterval = 0.01
    [[roseplt]]
        title = Wind Rose
        [[[windRose]]]

#[weatherRadialGraphGroup]
#    title = Temperature Range Radial
#    show_button = true
#    button_text = Weather Radial
#    time_length = year

#    [[radialChartName]]
#        title = This Year
#        css_class = "weatherRadial"
#        [[[weatherRange]]]
#            range_type = outTemp

#    [[radialChartName1]]
#        title = This Year
#        css_class = "weatherRadial"
#        [[[weatherRange]]]
#            range_type = outTemp
#            polar = true
#            width = 100%

#[comparations]
#    # Chart Timespan Defaults
#    title = "Homepage"
#    show_button = true
#    button_text = "Homepage"
#    tooltip_date_format = "LLL"
#    gapsize = 300 # This should be your archive_interval from weewx.conf

#    [[chart1p]]
#        title = Temperature_comparation
#        width = 100%
#        [[[outTemp]]]
#            zIndex = 1
#            name = Temperature_td
#            time_length = today
#            color = red
#        [[[outTemp]]]
#            zIndex = 1
#            name = Temperature_yd
#            time_length = days_ago
#            color = grey


