Welcome to the Cumulus Support forum.

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

Cumulus MX V4 beta test release 4.0.0 (build 4018) - 28 March 2024

Legacy Cumulus 1 release v1.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

AirQual Chart Zoom

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

Post Reply
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

AirQual Chart Zoom

Post by Phil23 »

Just looking at my Air Quality Chart's along side Hans's.

Hans's is scaled 0-8 while mine is 0-40, obviously becasue of the few spikes I lave along the way.
Would like to be able to see the data between the spikes with a bit of zoom.

I've got as far as this page https://www.highcharts.com/docs/chart-concepts/zooming, but didn't find any reference to it in the code.
Assuming the X-Axis Zoom becomes enabled with the Range Selector & that Y-Axis zoom could be added with something like chart.zoomType: "y"
in the appropriate place.

Not sure what would happen to the default scaling...

Anyone got any suggestions?

Thanks

Phil.

Edit:

I did try adding the above in below here, but it broke it.

Code: Select all

  title: { text: 'AirQuality Sensor Out for PM2p5'},
  credits: { enabled: true},
  xAxis: { type: 'datetime', ordinal: false, dateTimeLabelFormats: { day: '%e %b',week: '%e %b %y',month: '%b %y',year: '%Y'} },
  yAxis:
Edit again:

Have also tried pinchType: "xy", but all variations of my Syntax just breaks things.
Pretty obvious I'm stumbling about; probably just a matter of the correct thing, right syntax & in the right place....
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Mapantz
Posts: 1778
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 11 x64
Location: Dorset - UK
Contact:

Re: AirQual Chart Zoom

Post by Mapantz »

Try adding

zoomType : 'xy',

to

chart: {
Image
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: AirQual Chart Zoom

Post by HansR »

I'll look at how the y-axis is set up in MX, but I assume a min/max value is given which makes it a fixed scale. If you remove that, it defaults to an automatic scaling which would show if your selection of the x-axis could use another scale. I'll look it up more precisely later when i'm behind the computer.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: AirQual Chart Zoom

Post by Phil23 »

By default I see this...
Aq1.jpg
It would be great to zoom below the spikes & see something like this...
Aq2.jpg
From the first image it's highly probable I've cooked a few more BBQ's than Hans in the past week.

Cheers.
You do not have the required permissions to view the files attached to this post.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: AirQual Chart Zoom

Post by HansR »

If you reduce the period (x-axis) to some small period between the spikes you will see the scale dynamically adapt.
(The dynamical scaling of the y-axis is mentioned in the help button)

If you do not want to change the period you are watching it becomes a whole different story.
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
User avatar
beteljuice
Posts: 3292
Joined: Tue 09 Dec 2008 1:37 pm
Weather Station: None !
Operating System: W10 - Threadripper 16core, etc
Location: Dudley, West Midlands, UK

Re: AirQual Chart Zoom

Post by beteljuice »

As Hans says .....

Just grab the end tabs of the lower graph and 'shrink' to suit 8-)
Image
......................Imagine, what you will KNOW tomorrow !
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: AirQual Chart Zoom

Post by Phil23 »

Yes, I've played around with changing the span on the X-Axis.

Doesn't really help that much as the Y-Axis then bounces it's scale up & down with the need to pan across the X-Axis.
Hence I'd like to leave the data window size static & drop the Y-Axis scale down to suit.

Sounds like it can be 100% done, just need the code in the right place.
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: AirQual Chart Zoom

Post by Phil23 »

Mapantz wrote: Fri 25 Dec 2020 11:35 pm Try adding
zoomType : 'xy',
to
chart: {
Thanks,

That get's me part way there without breaking things.
Outcome is that on a desktop I can now draw a zoom box acros the data & it rescales to suit.
Also adds a reset zoom button to the chart that backs out to the default.

Phil
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: AirQual Chart Zoom

Post by HansR »

OK, Its in the 4.10 release as said on PM
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Phil23
Posts: 884
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis VP2+ & GW1000 (Standalone)
Operating System: Win10 Pro / rPi Buster
Location: Australia

Re: AirQual Chart Zoom

Post by Phil23 »

Just tried it on my Android phone,

ZoomType seems to have no effect on the mobile chart.
Changed the PM2p5 graph to use pinchType: 'xy' & it's now zoom-able on mobile but not desktop with the mouse.

Have now got both set, & it seems to work as expected on both platforms

Code: Select all

  let ReferenceConcentrations2p5 = [0,15,30,55,110];
  let t ={chart: { renderTo: 'chartcontainerOut2p5',type: 'spline',alignTicks: false,zoomType: 'xy',pinchType: 'xy'},
  title: { text: 'AirQuality Sensor Out for PM2p5'},
:Now: :Today/Yesterday:

Image

Main Station Davis VP2+ Running Via Win10 Pro.
Secondary Stations, Ecowitt HP2551/GW1000 Via rPi 3 & 4 Running Buster GUI.
:Local Inverell Ecowitt Station: :Remote Ashford Ecowitt Station:
User avatar
HansR
Posts: 5871
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bullseye
Location: Wagenborgen (NL)
Contact:

Re: AirQual Chart Zoom

Post by HansR »

No problem.

(but I revert if any unforeseen problem arises: note the relation with tooltip.followTouchMove, tooltip.followPointer and chart.panning makes it unnecessary complex but probably this is only for bar charts)
Hans

https://meteo-wagenborgen.nl
CMX build 4017+ ● RPi 3B+ ● Raspbian Linux 6.1.21-v7+ armv7l ● dotnet 8.0.3
Post Reply