nueza99
Posts: 25
Joined: Tue Aug 18, 2020 5:14 am

How to capture event after closing fullscreen

HI,

I would like to run some function immediately after fullscreen is closed, but do not know from where shall I call the function, Is there something like afterFullscreen:....function{} I have search for few hours, could not get it . Really appreciate any help
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: How to capture event after closing fullscreen

Hello,

You can wrap Highcharts.Fullscreen.prototype.close function and add after or before some code.

Demo: https://jsfiddle.net/BlackLabel/jtk7buxo/
More about extending Highcharts: https://www.highcharts.com/docs/extendi ... highcharts

Feel free to ask any further questions!
Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/
michal.f
Posts: 1114
Joined: Thu Aug 12, 2021 12:04 pm

Re: How to capture event after closing fullscreen

Hi,

This functionality has been added to Highcharts in version 10.1.0, you don't need to use a wrap anymore, now you can use the chart.events.fullscreenClose() and chart.events.fullscreenOpen() callbacks functions. More information in the latest changelog.

Demo: https://jsfiddle.net/gh/get/library/pur ... fullscreen
API: https://api.highcharts.com/highcharts/c ... creenClose
https://api.highcharts.com/highcharts/c ... screenOpen

Best regards!
Michał Filipiec
Highcharts Developer
https://blacklabel.pl/highcharts/

Return to “Highcharts Stock”