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 Query
- Highcharts shankey diagram percentage not showing
- Highcharts Error #16: charts not showing on the same page
- Highcharts Pie Chart Drilldown not showing on third drill
- 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?
- Highcharts spline chart points not showing unless zoomed in
- Legend and Axis titles not showing in Highcharts Graph
- Legend and Axis titles not showing in Highcharts Graph
- highcharts xaxis navigator not showing
- Highcharts not showing tooltip after update from null
- Data Not Showing in Highcharts
- DataLabels in Highcharts are outside the container / not showing
- HighCharts Pie chart, 50+ labels, not showing all of them
- Highcharts tooltip not showing on chrome
- High chart not showing accurate percentage for two curves?
- highcharts line not showing properly
- Highcharts Stock - rangeSelector results are not consistent - 3M showing 5 months data
- Negative values in the data not showing in highcharts linechart
- HighCharts Angular - data from API not showing in chart
- highcharts 2 variable JSON (Date, Value) not showing correctly
- Highcharts dataLabels not showing in all levels of drilldown
- Highcharts 3D scatter points not showing names in tooltips
- Highcharts not showing up
- Single Quotes not showing up properly in HighCharts graph
- Highcharts : I am changing x-axis label, why are the label's not showing up?
- Highcharts not showing value when two stacked columns have value = 1
- Highcharts donut pie not showing hover indicator if the slice color is white
- HighCharts Pie chart is not showing all of dataLabels, it's cut off
- Angular2 and Highcharts map - map bubbles not showing up
More Query from same tag
- Using custom boundaries in high map
- How to sort the yaxis in descending order if tickpositions in highcharts are used?
- Highcharts - Click event not firing outside of plot area
- Highchart event click runtime error in Ionic
- Add text to generated quadrant area by x and y plot lines , highcharts
- Change color of series in bar chart?
- Chart area exceeding series length
- Display real time scale on xAxis
- Highcharts - how to align two charts on a same line
- dash_styles in Highcharts
- Highcharts - stack values for same category
- Highcharts: Removing the legend Symbol that comes with marker
- Show only 1 Child node of Treemap HighCharts
- HIghcharts and dynamic json
- How can I create a chart with stacked columns after drilldown?
- HighCharts/jQuery: chart.redraw slow - possible to improve speed?
- Tooltip on custom button in Highcharts
- Highstock navigator padding issue
- How do you remove an annotation from Highcharts?
- Some series are not visible in a time serie chart with columns
- Styling issues with Highcharts JS
- Highcharts area chart with lazy_chart ruby gem
- highstock charts - button for date range
- Highcharts - Redraw/Resize chart after destroying legend?
- Highcharts, multiple scatter series dates not working with stacking
- Highcharts Plotoptions Series
- Vertical areas along with line on the chart - is that possible
- Some xAxis labels are not showing in Highchart : Area Chart
- How to make a rendered label in Highcharts always visible and still relative to the point clicked or hovered over
- Highcharts: Overlapping colors in bar type