Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Printing can include tooltip if crosshairs is turned on #1707

Closed
nebain opened this issue Apr 10, 2013 · 1 comment
Closed

Printing can include tooltip if crosshairs is turned on #1707

nebain opened this issue Apr 10, 2013 · 1 comment

Comments

@nebain
Copy link

nebain commented Apr 10, 2013

jsfiddle: http://jsfiddle.net/PEtv7/

When you click on the Export menu button and hover over the Print chart option, it activates the crosshairs and shared tooltip which wind up being printed.

As a local jQuery-specific workaround, we overrode the export module's print function to include this line after the 'hide all body content' section, which hides the tooltip, exporting button, and the vertical crosshair:

$('.highcharts-tooltip, .highcharts-button, .highcharts-container > svg > path').hide();

We then restore it as such:

$('.highcharts-tooltip, .highcharts-button, .highcharts-container > svg > path').show();
@nebain
Copy link
Author

nebain commented Apr 11, 2013

This didn't quite fix it... when I open the menu, chart.openMenus gets set to 1, so the tooltip disappears which is good. In Chrome for Mac (didn't test other browsers), the hide() function gets called twice after I click on print, so once the print dialog goes away, chart.openMenus gets set to -1, preventing the tooltip from showing up. Then, when I open the menu, the tooltip shows up again because chart.openMenus is incremented to 0.

http://jsfiddle.net/PEtv7/1/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant