We are using the bubble chart in our application and seeing a weird issue.
We have a tab component build by ourselves which only shows a navigation arrow icon on the side when there is more tabs than the tab container can hold. It does this by calculating the width of all tabs and comparing that against the width of the tab container.
In one of the tab we have this long bubble chart and whenever I use the print chart option from the context menu, it will open up the preview in the same browser tab with only the chart. Once I close the preview, it goes back to my original page and it triggers the navigation arrow on our own tab component even I only has one tab.
If I move the print preview to a new browser tab than it would not trigger our navigation arrow on tab. However, by move the preview to a new tab will causing the chart to be cutoff (since it is pretty long) without any resizing like it will have in the same browser tab
Here is the code I used to open preview in a new tab:
Code: Select all
exporting: {
menuItemDefinitions: {
printChart: {
onclick: function() {
var divToPrint = document.getElementById('bubbleChartId');
var newWin = window.open();
newWin.document.write(divToPrint.innerHTML);
newWin.document.close();
newWin.focus();
newWin.print();
newWin.close();
}
}
}