Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

296
Views
Highcharts add tooltip that has a small arrow pointing toward the series

I'm building a highcharts highmap using the documentation here: http://api.highcharts.com/highmaps/tooltip.style

And I have successfully style my tooltip the way I want it to look in terms of color and content..

Here is what I current have: enter image description here

Here is what I need (the little arrow or carrot on the tooltip)

enter image description here

Usually I would create this by using HTML :after or :before and relative positioning but I'm stumped on how to do this in highcharts. I know I could set useHtml:true and then apply css to the class rendering the tooltip but I feel like there must be a way to automatically have the tooltips do this through a prop in the highcharts?

Here is the code I currently have for the highchart:

let config = {
  tooltip: {
      backgroundColor: '#ff9600',
      borderWidth: 1,
      borderColor: '#ff9600',
      borderRadius: 2,
      formatter: function () {
          return '<b>' +
          '<span style="'+ tooltipStyle + '">' + this.point.name + ': $ 620 USD</span><br>' +
          '<span style="'+ tooltipStyle + '">' + this.point.value + ' Transactions</span>';
      }
  },

  series:[{
    allAreas: true,
    data: data,
    mapData: mapsPathData,
    joinBy: [countryCode],
    dataLabels: {
        enabled: false,
        format: '{point.name}'
    }
  }]

};
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In order to add arrow to your tooltip you can set followPointer: false

const options = {
  series: [{
    mapData: Highcharts.maps['custom/europe'],
    data: [
      ['is', 1],
      ['no', 1],
      ['se', 1],
      ['dk', 1],
      ['fi', 1]
    ]
  }],
  tooltip: {
    followPointer: false,
      backgroundColor: '#ff9600',
      borderWidth: 1,
      borderColor: '#ff9600',
      borderRadius: 2,
      formatter: function () {
          return '<b>' +
          '<span style="'+ 'tooltipStyle' + '">' + this.point.name + ': $ 620 USD</span><br>' +
          '<span style="'+ 'tooltipStyle' + '">' + this.point.value + ' Transactions</span>';
      }
  }
}

const chart = Highcharts.mapChart('container', options)

Live example: https://jsfiddle.net/krg9m2zb/

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!