I suggest you ...

Collision Detection for Data Labels

Implement collision detection algorithm that repositions overlapping data labels, with possible input parameters dictating a proportional distance to move labels away from each other, or directionality indicators.

102 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
Jamie shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

8 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...
  • Jakub Štěrba commented  ·   ·  Flag as inappropriate

    I would like to have also option to either show all labels if they do not overlap or none. This is essential to have good looking charts on different screen sizes. While data labels may fit on desktop, it may be better to hide them on smaller screen because of overlapping. There is no point to show only some of them in case of many data points in my opinion except for showing for example only minimum and maximum values.

  • Mike Zavarello commented  ·   ·  Flag as inappropriate

    I would like to add my voice to this conversation for bubble charts. Paweł Fus was gracious enough to offer a possible solution to this (see his comment at https://stackoverflow.com/q/48427876/2596103), but it unfortunately isn't effective for charts with lots of cramped, close bubbles and/or long labels. Another possible option could be adding connector lines to the bubbles, similar to the slices on the pie charts. Thank you!

  • RHC automation commented  ·   ·  Flag as inappropriate

    A collision detection for data labels would also be absolutely necessary for the new sankey chart.

    It would also be much better, if the dataLabels wouldn't be aligned in the middle of the sankey links but near the beginning of a link (most of the links are crossing in the middle and so a lot of dataLabels are overlapping).

    see jsfiddle:
    https://jsfiddle.net/RHCautomation/5yk3c19f/1/

  • Jamie commented  ·   ·  Flag as inappropriate

    Hello Henrik, and thanks.

    The allowOverlap feature is a nice start, and may work in many use cases, but when you really need every point label to show, a more complex and intelligent solution is necessary.

    With features like the overflow and crop properties already built in, and recognition of positive/negative values, and the detection that goes into the allowOverlap, Highcharts has done a great job in getting most of the way there :)

    A fully featured positioning system would be a huge benefit to add on top of these features.

Feedback and Knowledge Base