score:1
Accepted answer
You don't need to wrap any method, it is enough if you use formatter
callback function:
tooltip: {
useHTML: true,
formatter: function() {
const chart = this.series.chart;
const width = chart.plotWidth < 300 ? 100 : 200;
return '<div style="width:' + width + 'px">' + this.y + '</div>'
}
}
Live demo: http://jsfiddle.net/BlackLabel/5kdonwbj/
API Reference: https://api.highcharts.com/highcharts/tooltip.formatter
Source: stackoverflow.com
Related Articles
- Highcharts - Tooltip width in styled mode
- Highcharts tooltip line height in styled mode
- How to edit tooltip in Highcharts C# code
- how to use highcharts tooltip formatter in python code
- Disabling inactive state in Highcharts styled mode
- Prevent label text wrapping in Highcharts styled mode
- Cannot get Highcharts solidgauge stops to work in styled mode
- Fixed width Font Awesome in HighCharts tooltip
- Highcharts | Line height control for plot band labels in styled mode
- highcharts column stroke in styled mode
- Use classic mode instead of styled mode in Highcharts with Angular
- How to support a legacy style option (like series.color) in Highcharts CSS styled mode
- Highcharts - how to set line height in multiline annotations labels in styled mode
- Using Highcharts styled mode svg patterns not exporting
- Highcharts - Is there a way to disble styled mode for certain elements?
- Highcharts - how to wrap y-axis title in styled mode
- HighCharts : Exporting jpeg with background in styled mode
- Highcharts pie labels outline mising using styled mode
- Highcharts Booster not working in Styled Mode
- Coloring treemap by parent node in highcharts styled mode
- Disable highcharts tooltip on certain lines, leave it enabled on others?
- Highcharts - issue about full chart width
- Customize tooltip and format the number to 2 decimal places of highcharts
- Highcharts tooltip overflow is hidden
- Highcharts width exceeds container div on first load
- customize highcharts tooltip to show datetime
- Maximum bar width in Highcharts column charts
- highcharts pass multiple values to tooltip
- Disable tooltip on certain points in Highcharts
- HighCharts full width issue
- Highcharts doesnot reload or re-render chart on value change
- Highcharts Java Api wrapper for JSF?
- HighCharts starts zooming when scrolling in a 3D chart
- Assign colour to specific data in Highcharts depending on data type dynamically
- Possible to create a dual y axis chart but where the secondary y series is using a secondary x axis?
- Highcharts view data table is showing incorrect data
- How to get columns category name on hover in highcharts
- HighCharts: Possible to summarize series data and show in title?
- hchart Error in mutate_impl(.data, dots) : Column `x` is of unsupported type quoted call
- How to divide the x-axis in two parts in highcharts?
- Parse data from specified columns highcharts.js
- HighCharts with Dynamic Data not working
- highcharts tooltip formatter only shows first 8 characters in this.point.name
- unexpected token { in javascript
- highcharts xaxis datetime label with minor tick
- How to use highstocks navigator on a highchart
- Highcharts show plot value on x axis label
- Safari browser displaying invalid date for highcharts
- Highchart hide a category and rescale is messing
- highcharts: disable hover on column chart when i use two chart togheder