0

I am totally new to Highcharts, and I would like to know, if you can change the content of the "description box" shown for a point, when hovering over it with the mouse.

I tried: https://jsfiddle.net/by0sxgz1/17/ Using the pointDescriptionFormatter option for a series, but it does not work.

Code Snippet:

series: [
{
    name: 'mySeries1',
    accessibility: {
        enabled: true,
        pointDescriptionFormatter: function() {
            return "Hello"
        }
    },
    data: [{x:1, y:1, z:1},{x:2, y:2, z:2}]
}

I would like to see "Hello" in the small box over a point (when hovering with the mouse), instead of the normal description, which is Series and the x,y and z values.

What did I get wrong?

I am thankful for any link or tutorial aswell :)

Ed Bangga
  • 12,879
  • 4
  • 16
  • 30
Shushiro
  • 577
  • 1
  • 9
  • 32

1 Answers1

1

Add this to your highchart config:

tooltip: { 
        useHtml:true,   
        formatter: function() { 
        return "<div style='width:140px;text-align:center;'>Hello!</div>"; 
        } 
    }
Vasi G.
  • 161
  • 8
  • works perfectly! With the keyword "tooltip" I also found this, which could help others stumbling across the problem: https://stackoverflow.com/questions/43893035/how-to-customize-tooltip-in-highchart – Shushiro Jul 04 '19 at 09:31