score:64
You can change it so it shows the data value instead by modifying your tooltip pointFormat
from pointFormat: '{series.name}: <b>{point.percentage}%</b>',
to pointFormat: '{series.name}: <b>{point.y}%</b>',
You can round the numbers by using the Highcharts.numberFormat()
function like so in your formatter:
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ Highcharts.numberFormat(this.percentage, 2) +' %';
}
score:0
Simplest approach to show the actual data values is to omit the formatter function. The tooltip will default to show the actual data.
score:2
Here is a detailed description about tooltip formatter http://api.highcharts.com/highcharts#tooltip.formatter
this.point (not shared) / this.points[i].point (shared)
And try this.points[i].point
if this.point
didn't work
score:65
You can use Format Strings to help you format numbers and dates.
x Decimal Places
View the JSFiddle
// point.percentage = 29.9345816
pointFormat: '{point.percentage:.0f}%' // returns: `30%` - (rounds to nearest)
pointFormat: '{point.percentage:.1f}%' // returns: `29.9%`
pointFormat: '{point.percentage:.2f}%' // returns: `29.93%`
pointFormat: '{point.percentage:.3f}%' // returns: `29.935%`
Thousands separator
View the JSFiddle
// point.percentage = 1029.9
{point.percentage:,.0f} // returns: `1,030`
{point.percentage:,.1f} // returns: `1,029.9`
Read More in the documentation:
Documentation: http://www.highcharts.com/docs/chart-concepts/labels-and-string-formatting
Source: stackoverflow.com
Related Query
- Customize tooltip and format the number to 2 decimal places of highcharts
- customize Highcharts tooltip on marker points and show default tooltip on the other points
- How to remove the value and number labels from Highcharts angular gauge
- Why does this Highcharts graph only show tooltip for the first and last nodes?
- How to use jspdf to print and download the multiple highcharts contents in pdf format
- Tooltip in Highcharts doesn't show the right format for Date
- Highcharts - tooltip headerformat for 2 decimal places not working
- Display tooltip on hovering over the legend using Highcharts and jQuery-ui tooltip plugin
- HighCharts - how to customize the tooltip for dynamically added series
- update the yAxis min value and tooltip dynamically in highcharts
- highcharts Line color in the chart, in the legend and in the tooltip do not match
- How to translate the "Start" and "End" label in the tooltip of a Highcharts Gantt?
- how to customize heatmap highcharts plot area and the color of the datalabels
- Highcharts Bar Graphic: Make small number the higher bar and large number the smaller bar
- how can I use rangeselector and navigation in highcharts in the given code
- Calling Highcharts export to jpeg but the source is https and exporting is http (security warnings issued by browser)
- How to customize a legend in highcharts as the image and while clicking on the leg end appears lines inside linechart
- HighCharts : Is it possible to customize the colors of individual series?
- How to use the tooltip formatter and still display chart color (like it does by default)?
- What format does the highcharts js library accept for dates?
- customize highcharts tooltip to show datetime
- How to Format Highcharts dataLabels Decimal Points
- Format tooltip numbers in Highcharts
- How do you increase the performance of highcharts chart creation and rendering
- Highcharts - How to display legend symbol inside the tooltip
- Highcharts Pie Chart ignores percentageDecimals tooltip setting and has floating point inaccuracy issue
- highcharts customize tooltip for a single point
- Highcharts - How to hide series name and Y value in tooltip
- Highcharts shared tooltip requires different valueSuffix and varying decimals
- Add a gap between the second and third series in a Highcharts column plot with four series displayed
More Query from same tag
- Can't load highcharts.js and highmaps.js (map.js don't work)
- Highcharts - Update a series point [x,y] values?
- highgraphs chart not rendering
- Use series data but display custom text on top of columns Highchart
- Toggle button visibility on iframe fullscreen with highcharts
- Highcharts : remove custom legend tooltip from export
- Highcharts export all data in Stockchart
- HighMaps how to update data using jQuery
- Changing value of variable in Highcharts selection event in angular
- How to wrap legend items in highcharts?
- How to remove axis labels without data points in Highcharts?
- Legend and Axis titles not showing in Highcharts Graph
- Legends not matching columns ticks on xAxis in Highcharts
- Get name of clicked point in Highcharts when the point has drilldown
- Pointplacement for a column when two columns are shown in same chart
- How to display the collection in the library dynamically Highcharts - Bind collection with Highcharts in MVC
- highcharts stacked columns and spline messed up yAxis display
- Error displaying Gantt chart in laravel
- How to convert powerpoint chart for web use?
- How to add scroll on highcharts multiple drilldown
- highcharts column charts show sum single 0 when entire column data total is 0
- Highcharts - Issue with js counter for data display
- Simple, Open source PHP wrapper for Highcharts library
- "npm err: not a package" when installing node.js dependencies for Highstock-browserify
- Highcharts not showing up
- When changing data, why is the data reduced every time the button is pressed?
- continue the line drawing on dotnet highchart
- highcharter - where are the already downloaded maps for hcmap() stored on a (shiny) server?
- Filter categories in highcharts by using checkboxes
- Column chart: Set background of exactly one column