score:2
Well, I can't tell you how to prevent the floating point error from occurring in the first place, but I can tell you how to hide it from the user.
You can simply use Math.round()
in your formatter
function, as follows:
formatter: function() {
return '<b>'+ this.point.name +'</b>: '+ Math.round(this.percentage) +' %';
}
You already have a formatter function; I've just added Math.round()
to it.
I've updated your fiddle to demonstrate: http://jsfiddle.net/A2cVe/1/
[EDIT] You mention that the tooltip was also showing the error. There is also a separate formatter
function for that. I've updated the fiddle again with both formatter functions now edited to show the expected value: http://jsfiddle.net/A2cVe/2/
score:0
This issue is related with known bug https://github.com/highslide-software/highcharts.com/issues/897
Source: stackoverflow.com
Related Query
- Bug with highcharts pie-basic percent
- Highcharts connecting scatter chart and pie chart with single legend
- Highcharts hover bug - with video to demonstrate
- Highcharts - Global configuration with common code and unique data & Headings
- DotNet HighCharts , Populates a pie with the result of a query
- Highcharts pie graph with two rings filtering
- Highcharts bar with non-stacked percent series
- Grouping Legends in Pie Chart with Highcharts
- Highcharts - Getting a 3d effect with selected pie chart slices
- Not able to draw a Pie Chart with external csv file in HighCharts
- Sweep animation with highcharts pie
- passing formatting JavaScript code to HighCharts with JSON
- Highcharts bug with labels
- Image on pie graph with highcharts
- Highcharts 3D pie with custom colors
- Highcharts - pie chart with html div at center
- Show/Update Separate Bar graphs with Drilldown Pie chart of Highcharts
- Highcharts pie rendering in conflict with legend
- Highcharts - Pie chart with negative values
- Highcharts display label for pie chart using html table as data source
- Highcharts pie with a single value in %
- HighCharts Bug with LiveChart
- HighCharts populate Pie Chart with data from SQL Database
- Highcharts Semi Donut Pie with Negative Percentage
- Highcharts drilldown to pie chart - Clicking on axis label with multiple series causes pie charts to overlap
- HighCharts - making a Pie with MySQL and PHP
- Highcharts series visibility with csv data source
- Highcharts percent with value
- Highcharts tooltip bug with stacked column chart
- Highcharts issue when dealing with 3D pie and large labels
More Query from same tag
- highcharts animation multiple spline per second
- highchart stacked column, display extremely small values in shift lable
- HighCharts round down when over 100
- HighCharts: loading from csv file, blank page in HTML/JS
- Can we change highcharts legend to work as radio button instead of checkbox style?
- Highcharts 2nd yaxis not scaling
- Using image tag as series name in highcharts
- Highcharts: chart with strange characters
- how to stop ajax call in live highcharts when no new data
- Spline graph not showing in highchart
- highcharts: get yaxis title?
- Pie Chart Center Text gets overlap with tooltip
- Create Directional Arrows on highmaps
- Highcharts and Ajax using php
- Highcharts: SeriesMapping with CSV
- How to affect candlestick color-up/color-down classes
- Adding an empty series changes axis minimum value
- How do I add a dropdown to change endRow value in a chart displaying date from an HTML table
- How to implement date selector to HighChart StockChart in reactjs (without jQuery)
- Display time on Xaxis with line chart make by Highcharts
- Opacity colors in Highcharts (with default color)
- HIghcharts Treemap Groupby leaf objects at Level 1(Parent) and group by child at Level1(Sub objects)with custom color coding
- How to set a static minimum value for axes in Highcharts
- How to remove space below the semi-circle in highcharts?
- Replace data set every min
- How can I display crosshair labels on top of the chart with Highcharts
- plot one point in highchart shiny r
- Highchart pie chart colors are not changing
- Highchart graph inside leaflet popup using geojson data and oneachfeature
- Render Highchart with dynamic ID in jQuery tooltip