I am using high charts, and am testing the toggle fullscreen button seen here https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/members/chart-togglefullscreen/
The issue I am having is that once the high charts iframe fills the screen the toggle button is hidden, and I can no longer toggel back without hitting escape, which defeats the purpose of the toggle button.
Here is the js
var chart = Highcharts.chart('container', {
credits: {
enabled: false
},
xAxis: {
categories: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']
},
series: [{
data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4]
}],
navigation: {
buttonOptions: {
enabled: false
}
}
});
// The button handler
document.getElementById('button').addEventListener('click', function () {
chart.fullscreen.toggle();
});
html
<div id="container" style="height: 300px; margin-top: 1em;"></div>
<button id="button">Toggle fullscreen</button>
I have tried z-index with position values on both elements but the toggle button is always hidden. Is there a way to have the toggle button sit in the Iframe, or sit above it so I can fire it and close the fullscreen on a button click event (the toggle event)
Thanks ahead of time, if you have any ideas here.