Highcharts Column Tooltip - Always Top + Goes to Container

I have a graphical graph with tooltips. This is how I want to display the tooltips every time.

good case

When tootlip doesn't fit svg container, highcharts changes the position of the tooltip like this.

bad case

I know how to fix this, but when I do.

positioner: function(boxWidth, boxHeight, point) {
    return {
        x: point.plotX,
        y: point.plotY - boxHeight
    };
},

      

The tooltip is always always on top, but overflows to the right (image_1). I would like the tooltip to always be on top + adjacent to the sides of the container. (IMAGE_2)

enter image description here

enter image description here

Is there an easy way to achieve this?

Thanks ( http://jsfiddle.net/4xomw3aj/ )

+3


source to share


1 answer


Okay, I just learned how to "not change". In Tooltip.getPosition ()



firstDimension = function (dim, outerSize, innerSize, point) {
    ret[dim] = point - distance - innerSize;
},

      

+1


source







All Articles