Sobis
Sobis

Reputation: 1405

Highcharts spline dataLabels overlapping

I have a question about highchart's overlapping data labels. I have 2 spline data series and as you can see here http://jsfiddle.net/3E8V4/ some data labels are overlapping.

Question here is: is this overlapping even possible to prevent? If yes - how should I do it?

Code for plotoptions is like that:

plotOptions: {
            spline: {
                dataLabels: {
                    enabled: 'True',
                    crop: false,
                    overflow: 'none'
                },
                enableMouseTracking: false
            }
        },

Upvotes: 0

Views: 3272

Answers (2)

Paweł Fus
Paweł Fus

Reputation: 45079

You can use that plugin for repositioning dataLabels: http://jsfiddle.net/menXU/1/ It's not perfect, since works only for max 2 series and requires disabled animations, or you will see little delay when repositioning dataLabels.

How to use? Copy StaggerDataLabels and isLabelOnLabel functions, and then use StaggerDataLabels in load and redraw events for chart.

Upvotes: 4

Strikers
Strikers

Reputation: 4776

Sobis,

I don't have a answer that is exactly what you are expecting.

In this case what i would do is increase the max of yAxis by 10% of the maxi m of the data. provide zoom in/out. that will enable the user to get a values on top of the points

zoomType: 'xy'

here is an example http://jsfiddle.net/3E8V4/1/

hope you will find it useful

Upvotes: 0

Related Questions