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

hide data labels if number doesn't fit in stacked bar is working for all export format except pdf in Client side export #6818

Closed
hellodpk opened this issue Jun 9, 2017 · 5 comments

Comments

@hellodpk
Copy link

hellodpk commented Jun 9, 2017

Expected behaviour

It should work as it is working for other export format in client side export

Actual behaviour

when using client side export generated pdf is showing data labels is bars which is not expected

Live demo with steps to reproduce

This is post from stackoverflow Highcharts exporting hide data labels if number doesn't fit in stacked bar

fiddle when using Client side export generated pdf is not correct

@pawelfus
Copy link
Contributor

pawelfus commented Jun 9, 2017

Hi @hellodpk

Thank you for reporting the issue. Instead of hiding labels, destroy them when exporting, demo: https://jsfiddle.net/kez30b00/

@hellodpk
Copy link
Author

hellodpk commented Jun 9, 2017

Thank a lot @pawelfus this really helped me

@hellodpk hellodpk closed this as completed Jun 9, 2017
@ellier7
Copy link

ellier7 commented Jun 9, 2017

I noticed when you add yAxis styling, the datalabels are not destroyed. Please see demo: https://jsfiddle.net/er1187/6dm0rwn6/1/

@pawelfus
Copy link
Contributor

pawelfus commented Jun 9, 2017

It looks like yAxis styles cause chart to redraw, which recreates labels. In that case add chart.events.redraw event too. I am not sure if this is expected, but I would set those events only for exporting chart, demo: https://jsfiddle.net/ah79wk06/

@ellier7
Copy link

ellier7 commented Jun 9, 2017

Great, that works. thanks so much!

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

No branches or pull requests

3 participants