Daniel Hansson
Posts: 5
Joined: Wed Nov 23, 2022 2:57 pm

Measure annotation - Call function on controlpoint drag

Hey!
Trying to call a function while the user resizes the measure annotation. Measure annotation is found under annotation-advanced.
I tried to hook the function to controlpoint found under point, in typeOptions, without any results.
Linked jsfiddle with modified measure example to show what I am trying to do.
https://jsfiddle.net/c7oju3ev/
Daniel Hansson
Posts: 5
Joined: Wed Nov 23, 2022 2:57 pm

Re: Measure annotation - Call function on controlpoint drag

Update: I solved it by extending the measure drag function with my version.
https://jsfiddle.net/c7oju3ev/1/ as shown in example.

Not the prettiest but it works. Let me know if there is a better solution.
kamil.m
Posts: 892
Joined: Thu May 19, 2022 1:33 pm

Re: Measure annotation - Call function on controlpoint drag

Hi there,

Welcome to our forum!

Your solution is great, here is the more elegant way of doing it:
https://jsfiddle.net/BlackLabel/erL341v8/

Let me know once you'll need anything else,
Regards!
Kamil Musiałowski
Highcharts Developer

Return to “Highcharts Stock”