Closed bonjour81 closed 5 years ago
Gap size needs to match the interval between your points. Anything outside of that interval will not show.
For example, if you look at the week chart:
[week]
# Chart Timespan Defaults
aggregate_interval = 3600 # 1 hour
gapsize = 3600000
Because the aggregate interval is 1 hour, the gapsize needs to match that same 1 hour (in milliseconds). If a point is more than 1 hour (say 2 hours) apart, then a gap will show indicating that the 1 hour was missed.
If you don't have an aggregate_interval defined, then the gapsize needs to match the expected interval between points. Typically this would be your archive interval from weewx.conf. (defaults to 5 minutes). That's why the default gapsize is gapsize = 300000
, 5 minutes in milliseconds.
gapsize is a chart-wide setting. So if Batterie
reports every 5 minutes, but Volt. Solaire
only reports every 10 minutes, then you will have problems with Volt Solaire
because the gapsize is 5 minutes, but that reports every 10 so it will always be in a gap
maybe I misunderstood how gapsize works....but for daily records (homepage graphs), I assume the aggregate internal is the weewx record interval. If gapsize shall match this, how can I "hide" some gaps if a sensor miss one or a few records ?
infact, I'm not sure to understand what is gapsize job if it's same as agreggate interval ?
Have a look at this ticket and it's history. It may help you understand? https://github.com/poblabs/weewx-belchertown/issues/48
This may also help you: https://api.highcharts.com/highstock/plotOptions.area.gapSize
The job of gapsize is to show a gap if the distance between two plots is greater than the gapsize.
So if the archive interval, or aggregate interval is set to 5 minutes, we set gapsize to 5 minutes since we are expecting a plot every 5 minutes. If the distance between plots is more than 5 minutes, it shows the gap. The gap indicates data was lost.
For example, you suffer a power outage and your station is down for 60 minutes. Then the charts will show the gap to indicate there was no data. Why was there no data? You had a power outage.
Gap size is chart-wide and not for each sensor. So if you have sensors that report at odd intervals, then you will need to put them onto another chart so that gapsize will work.
Ahhh I think I understood.. it your gapsize same as highcharts gapsize parameter ?
Infact I was thinking it was what is called "connectNulls" in highcharts. if yes, sorry for my confustion !!
Yep, it's the same as highcharts 😃
I have made a quick reading of #48 (that's a very long discussion! :-) ). it seems both discussions are related. I have to re-read more carefully :)
But ok, I think I misunderstood completely the role of gapsize. What I was looking for is "connectNulls". (https://api.highcharts.com/highcharts/plotOptions.series.connectNulls).
May I suggest to add connectNulls options available for graphs.conf ?
@bonjour81
As the guy who raised #48, let me summarise the discussion for you. What happened previously was that the timescale became non-linear if there was a gap in the readings. Time tick-marks (horizontal axis) would disappear but the curve would be continuous. The changes that Pat made overcame that and inserted a gap in the curve with all the time tick-marks present.
You are right that the two points are related - you want the gap bridged, still retaining the linear time-scale.
HTH
I just pushed the update for connectNulls. It defaults to false, so you have to specify it to true.
Here's my test. Top chart shows my gapSize. Bottom chart has the same gapSize, but connectNulls is enabled so the line is connected.
To add connectNulls, use it at the top of the graph group like:
[day]
title = Today
show_button = true
button_text = Today
time_length = today
gapsize = 300000
connectNulls = true
Please give it a test and close this if you're all set!
That's a good idea, I tried it on last release 1.0rc8.4, also working if we put connectNulls = true in global charts default. I have to do that because sometimes my weather station doesn't record anything for some hours or minutes on multiple sensors.
Sorry, connectNulls = true
won't be a global default. Thanks for #48 and the work done there, the Highcharts are now in line with weewx's default charts.
The gap is intentional to show missing data such as your sensors not sending data.
If you want to show a line between the missing points, connectNulls
is now available!
Take a look at the Seasons skin and how it handles gaps. (this is last 25 hours but the gap is still there)
Compared to Highcharts with gapsize. (showing the last 9 hours but with the same gap)
Closing this since connectNulls is working pretty good for me during my tests!
Hi! Sorry, I have been a bit busy, but I made a few tests last hours, all is fine. For example, my sensor sending battery voltage every 10min (so missing some weewx records) is now well displayed on charts. Thank you!
Hello! I played a bit with gapsize, because some of my sensors emits slower than weewx record interval. For example, my rain sensor emits only when some rain worth to be reported (no rain, no emission). My wind sensors emits information regarding battery voltage or solar panel every 10 minutes.
I set gapsize big enough on those graphs, expecting the gaps to be filled. It does works on rain, but does not work on my electrical data, I was not able to figure out why.
Here is my graphs.conf if needed,but I reported the relevant section below. (I renamed graphs.conf to txt so that github allows to upload) graphs.conf.txt
gapsize works fine:
Gapsize seems not working:
I added markers in WIsolar so the points are visible.
working: not working (I would expect the small triangle markers to be connected).