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.
Welcome to the Cumulus Support forum.
Latest Cumulus MX V4 release 4.2.1 (build 4043) - 19 October 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
Latest Cumulus MX V4 release 4.2.1 (build 4043) - 19 October 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?
Moderator: mcrossley
-
- Posts: 270
- Joined: Tue 10 Sep 2013 8:40 pm
- Weather Station: Ecowitt GW1000 / various sensors
- Operating System: Raspbian 12 Bookworm (X64)
- Location: Freiston, Lincolnshire, UK
- Contact:
Re: Gust with a dot on the charts - how to turn it off?
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.
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.
- Dador
- Posts: 286
- 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?
I edited the charts.js file as follows.
In the tooltip section I removed the line
Currently, the charts show gust in integer values and wind speed in decimal values.
That was it!
Big Daddy, thx for help.
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
};
Code: Select all
valueDecimals: config.wind.decimals,
That was it!
Big Daddy, thx for help.
-
- Posts: 270
- Joined: Tue 10 Sep 2013 8:40 pm
- Weather Station: Ecowitt GW1000 / various sensors
- Operating System: Raspbian 12 Bookworm (X64)
- Location: Freiston, Lincolnshire, UK
- Contact:
Re: Gust with a dot on the charts - how to turn it off?
Excellent. Pleased I could help.
- mcrossley
- Posts: 13566
- 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?
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...