score:1
Accepted answer
You need to use nodeFormatter
function and calculate percentage value:
dataLabels: {
nodeFormatter: function() {
const point = this.point;
const percentage = point.linksTo[0] ?
point.sum / point.linksTo[0].fromNode.sum * 100 :
100;
return point.name + ' >> ' + point.sum + ' (' + Math.round(percentage) + ')%'
}
}
Live demo: https://jsfiddle.net/BlackLabel/q845s7on/
API Reference: https://api.highcharts.com/highcharts/series.sankey.dataLabels.nodeFormatter
Source: stackoverflow.com
Related Articles
- Highcharts shankey diagram percentage not showing
- Highcharts chart option backgroundColor:'transparent' showing black on IE 8
- How to display the value instead of percentage in a pie chart using jquery Highcharts
- Displaying percentage inside pie item for highcharts
- Displaying percentage in Y-axis of Highcharts column chart
- Highcharts percentage of total for simple bar chart
- Highcharts Error #16: charts not showing on the same page
- Highcharts - Keep tooltip showing on click
- Always showing tooltip on all columns in Highcharts
- Highcharts Pie Chart Drilldown not showing on third drill
- Highcharts : Venn Diagram how to show total and union numbers?
- Why are the labels for my opposite yaxis in Highcharts not showing up?
- DataLabels formatter not working in Highcharts Sankey Diagram
- Highcharts line chart tooltips not showing correctly?
- Showing HighCharts in A JQuery Mobile application
- Dual axis using percentage and absolute value to same serie in Highcharts
- Highcharts spline chart points not showing unless zoomed in
- Highcharts : Showing wrong color in data series
- Highcharts showing nearest point causes flickering crosshair and strange order
- Using PhantomJS to create HighCharts grahps server side for use in PDF creation (PHP) - results in exit code 11 from PHPs exec();
- Legend and Axis titles not showing in Highcharts Graph
- Legend and Axis titles not showing in Highcharts Graph
- Highcharts - Global configuration with common code and unique data & Headings
- Highcharts tree map showing wrong min value
- highcharts xaxis navigator not showing
- Highcharts not showing tooltip after update from null
- HighCharts - compare series with values instead of percentage
- Highcharts problem - showing labels in zoomable chart
- Data Not Showing in Highcharts
- Data with timestamp group to month(like Jan, Feb, March) and showing as total count for month in Highcharts
- Highcharts SetData Only Works One Time
- Multiple group_by shiny app making a plot
- How to change JSON Format For load data to Highchart
- Drawing 3D bar charts using Highcharts through JS
- Highcharts Drilldown with breadcrumb navigation
- how to add dynamic series in highcharts
- rChart, for loop
- Formatter Using HighCharts
- Highcharts crashes when I assign the options
- highcharts piechart - small number of colors
- Highcharts / Highstock: How to access values at the centers of dataGroups of another series
- Vuejs Data Update
- Highcharts: Marker radius does not seem to work
- gem Lazy High Charts - Pie Donut
- Highcharts: cannot amend the histogram tooltip
- Highcharts data loading from a JSON file error in setting up datetime
- Adding Highcharts chart to draw2d canvas
- How to update HighChart series inside setInterval method
- In Highstocks, how do I change the default time/day labels when hovering over graph?
- Highcharts or Fusioncharts,which one to select