Welcome to the Cumulus Support forum.

Latest Cumulus MX release 3.9.5 (build 3100) - 14 January 2021 (please see announcement regarding releases since 3.5.0)
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 the NOAA report and Snow Index drop-down menus to 2030)

Use this Wiki link to Download the Software (Cumulus MX / Cumulus 1 and other related items).

AirQual Chart Zoom

Discussion of the Cumulusutils tool and website generator.

Moderator: HansR

Post Reply
Phil23
Posts: 602
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
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....

Mapantz
Posts: 902
Joined: Sat 17 Dec 2011 11:55 am
Weather Station: Davis Vantage Pro2
Operating System: Windows 10 x64
Location: Dorset - UK
Contact:

Re: AirQual Chart Zoom

Post by Mapantz »

Try adding

zoomType : 'xy',

to

chart: {
Image

User avatar
HansR
Posts: 1651
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
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.
https://meteo-wagenborgen.nl / Cumulus 3.9.4 (build: 3099)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.79-v7+ armv7l
Mono JIT compiler version 5.18.0.240 (Debian 5.18.0.240+dfsg-3 Sat Apr 20 05:16:08 UTC 2019)

Phil23
Posts: 602
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
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.

User avatar
HansR
Posts: 1651
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
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.
https://meteo-wagenborgen.nl / Cumulus 3.9.4 (build: 3099)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.79-v7+ armv7l
Mono JIT compiler version 5.18.0.240 (Debian 5.18.0.240+dfsg-3 Sat Apr 20 05:16:08 UTC 2019)

User avatar
beteljuice
Posts: 3100
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: 602
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
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.

Phil23
Posts: 602
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
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

User avatar
HansR
Posts: 1651
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
Location: Wagenborgen (NL)
Contact:

Re: AirQual Chart Zoom

Post by HansR »

OK, Its in the 4.10 release as said on PM
https://meteo-wagenborgen.nl / Cumulus 3.9.4 (build: 3099)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.79-v7+ armv7l
Mono JIT compiler version 5.18.0.240 (Debian 5.18.0.240+dfsg-3 Sat Apr 20 05:16:08 UTC 2019)

Phil23
Posts: 602
Joined: Sat 16 Jul 2016 11:59 pm
Weather Station: Davis Vantage Pro2 Plus
Operating System: Win7 Pro
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'},

User avatar
HansR
Posts: 1651
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: Davis Vantage Pro 2+
Operating System: Raspbian GNU/Linux 10 (Buster)
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)
https://meteo-wagenborgen.nl / Cumulus 3.9.4 (build: 3099)
Davis Vantage Pro 2+ / Raspberry Pi 3 Model B Plus Rev 1.3
Raspbian Buster / 5.4.79-v7+ armv7l
Mono JIT compiler version 5.18.0.240 (Debian 5.18.0.240+dfsg-3 Sat Apr 20 05:16:08 UTC 2019)

Post Reply