Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Calculator

0

127
Views
Sorting Sankey chart's source & destination nodes alphabetically

I am creating Sankey chart using Highcharts where I want to sort my source and destination labels alphabetically. In this image you can see labels are randomly assigned as per data values. I want to sort those labels for both source and destination. So in second column I want to see nodes in below order,

England -> France -> Portugal -> Spain

How can sort all nodes to get such result ?

Thank you! enter image description here

7 months ago · Juan Pablo Isaza
1 answers
Answer question

0

There is no special option for sorting by name in a sankey type diagram, the data visualization is based on the flow composition algorithm.

You can easily post-sort by rearranging the data in the correct order according to the keys.to.

data: [
  ['Canada', 'England', 1],
  ['Canada', 'France', 5],
  ['Canada', 'Portugal', 1],
  ['Brazil', 'Portugal', 5],
  ['Brazil', 'France', 1],
  ['Brazil', 'Spain', 1],
  ['Brazil', 'England', 1],
],

https://jsfiddle.net/BlackLabel/f5L3ajy8/2/

7 months ago · Juan Pablo Isaza Report
Answer question
Find remote jobs