Tooltip format highcharts

Is it possible to set the format of the values shown in a tooltip in highcharts? Similar to how we can set the axis and data label formats. Example here

I’ve tried using pointFormat, but doesn’t seem to be working. Would like the tooltip to match yaxis labels with thousands (,) separator and no decimal places.

  "chartOptions": {
    "yAxis": [
      {
        "gridLineColor": "#bfbfbf",
        "gridLineWidth": 2,
        "title": {
          "text": "# of Tests"
        },
        "labels": {
          "format": "{value:,.0f}"
        }
      }
    ],
    "tooltip": {
      "crosshairs": true,
      "shared": true,
      **"pointFormat": "{point.y:,.0f}"**
    }] 

Thanks,
Cyrus

"chartOptions": {
    "yAxis": [
    {
        "gridLineColor": "#bfbfbf",
        "gridLineWidth": 2,
        "title": {
            "text": "# of Tests"
        },
        "labels": {
            "format": "{value:,.0f}"
        }
    }
    ],
    "series": [
        {
            "dataLabels": {
                "enabled": true,
                "format": "{point.y:,.0f}"
            },
            "type": "area",
            "minorTicks": true,
            "opacity": 0.8,
            "tooltip": {
                "pointFormatter": "",
                "pointFormat": "{series.name}: <b>{point.y}</b> <br/>",
                "valueSuffix": "",
                "valueDecimals": 2
            }
        }
    ]
}

"pointFormatter": “”,
"pointFormat": "{series.name}: {point.y} ",
this is the important bit inside the series object

2 Likes

Hi @ishapiro,

You can start and end a code block with 3 ticks (```) on a line by itself to designate a code block in the forum post. The tick is beside on the number 1 on a en-us keyboard.

image

{
	"name": "Frank"
}

Thank you! Using pointFormatter and pointFormat together did the trick!