I want to load data from an external CSV-file to a Highcharts sankey diagram. After trying several options, I am not sure if this is even possible, as the result is always an empty chart? The CSV-file will be on the same server in the final version.
As a simple case, see the fiddle https://jsfiddle.net/oy095kzb/ which is merely copy/paste from the official Highcharts sankey example (where data is included in the code), except that data-module is loaded and csvURL is used instead:
series: [{
keys: ['from', 'to', 'weight'],
data: {
csvURL:'https://www.test.basleratlas.ch/sankey_test.csv'
},
type: 'sankey',
name: 'Sankey demo series'
}]
CSV-file-structure:
'from', 'to', 'weight'
'Brazil', 'Portugal', 5
'Brazil', 'France', 1
'Brazil', 'Spain', 1
'Brazil', 'England', 1
'Canada', 'Portugal', 1
...