Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.0.0 (build 4022) - 11 May 2024

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

Gust with a dot on the charts - how to turn it off?

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
User avatar
Dador
Posts: 225
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Gust with a dot on the charts - how to turn it off?

Post by Dador »

Hi,

I changed the settings

Station settings ->General Settings -> Units -> Advanced options

Wind speed decimals - 0
Wind speed average decimals - 1

On Dashbord everything is ok, i.e. speed and gust is an integer without a dot, avg speed is with a dot.
However, on the charts, the values are still with a dot, e.g. 10.0, 12.0, as you know. And they should be 10, 12, etc.

I suspect I need to make changes to the charts.js file to change this. Probably around line 631. But what should I enter there?

The question is basically for Mark, because that's how it works on his website. But if anyone else can give me a hint, I'd be grateful.
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Gust with a dot on the charts - how to turn it off?

Post by Big Daddy »

I think you can specify a decimal value in the series using for example valueDecimals: 1,

If you take a look at line 1095 onwards which is for Sunshine Hours you will see it in use there.

series: [{
name: 'Sunshine Hours',
type: 'column',
color: config.series.sunshine.colour,
yAxis: 0,
valueDecimals: 1,
tooltip: {valueSuffix: ' Hrs'}
}]

I'm no expert but would suggest that the "decimal" is being set on line 631 by valueDecimals: config.wind.decimals, which would be from the config, but only from one of the options, it doesnt seem to differentiate between wind speed and average.

you could try commenting out line 631 by adding // at the front so line 631 reads:
//valueDecimals: config.wind.decimals,

Then add a new line 636 so that section reads:

name: 'Wind Speed',
valueDecimals: 1,
color: config.series.wspeed.colour

and the next section reads
name: 'Wind Gust',
valueDecimals: 1,
color: config.series.wgust.colour

Adjust the value of valueDecimals to try and get the results you are looking for. valueDecimals: 0, gives no decimal places i.e. 10, 12 etc whereas valueDecimals: 1, should give one decimal place i.e. 10.1, 12.3 etc

This way you can control each series.
User avatar
Dador
Posts: 225
Joined: Thu 24 Nov 2011 2:22 pm
Weather Station: Davis VP2 Plus & Ecowitt
Operating System: Windows 10
Location: Rybnik, Poland
Contact:

Re: Gust with a dot on the charts - how to turn it off?

Post by Dador »

I edited the charts.js file as follows.

Code: Select all

        tooltip: {
            shared: true,
            crosshairs: true,
            valueSuffix: ' ' + config.wind.units,
            xDateFormat: "%A, %e %b, %H:%M"
        },
        series: [{
            name: 'Wind Speed',
            valueDecimals: 1,
            color: config.series.wspeed.colour
        }, {
            name: 'Wind Gust', 
            valueDecimals: 0,
            color: config.series.wgust.colour
        }],
        rangeSelector: myRangeBtns
    };
In the tooltip section I removed the line

Code: Select all

valueDecimals: config.wind.decimals,
Currently, the charts show gust in integer values ​​and wind speed in decimal values.

That was it!

Big Daddy, thx for help.
Big Daddy
Posts: 265
Joined: Tue 10 Sep 2013 8:40 pm
Weather Station: Ecowitt GW1003 (GW1000)
Operating System: Raspbian 10 (Buster) / Mono 6.12
Location: Freiston, Lincolnshire, UK
Contact:

Re: Gust with a dot on the charts - how to turn it off?

Post by Big Daddy »

Excellent. Pleased I could help.
User avatar
mcrossley
Posts: 12840
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: Gust with a dot on the charts - how to turn it off?

Post by mcrossley »

The wind charts currently use the average speed decimals for both average and gust. I'll add a ToDo item to have separate values for each...
Post Reply