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
Pie with long dataLabels with useHTML: true wrongly rendered #10031
Comments
Im not sure if it is a bug. By default, the ellipsis are applied on direct datalabels div (which does not have content like text, directly). When you use extra div, it does not inherit parent's styles. As a result ellipsis is not visible. Apply CSS styles and then will be visible.
Demo: Internal note @TorsteinHonsi @KacperMadej what do you think? |
I'm not sure either, but in general it's a bad omen that it behaves differently depending on |
Looks like a problem with a lack of inheritance, but this is how a I have reported this on behalf of a client, so I'll let them know about the possible solution. |
Thank you for looking. I changed the way you suggested and it improved it. I viewed it on a phone in portrait and the problem is there. Landscape looks good. Uploaded the sample here - Thanks. |
Minimal demo: https://jsfiddle.net/BlackLabel/bLrujcfa/4/ |
This is caused by trying to set negative width for an element in this code: highcharts/js/parts/DataLabels.js Lines 1221 to 1236 in 7f0ce96
|
Workaround: @writetonsharma Please check on your web site if the wrapper will resolve your issue, to confirm the solution will work for you. The wrapped code needs to be loaded before a chart will be create, but after all Highcharts files (core + modules) will be loaded. |
I tried the solution and put the code at the beginning of the <script> section. I think it is working. I have sent the HTML to our support and they will get it verified from the customer. I will let you know whatever the reply will be. |
Behaviour
In a pie chart with dataLabels having useHTML set to true, if labels string creates a new element (e.g. div) then cropping is not working correctly (no ellipsis) and long labels are making the pie move out of center - point could be pushed out of plot area.
Live demo with steps to reproduce
https://jsfiddle.net/BlackLabel/pb1az94h/1/
The text was updated successfully, but these errors were encountered: