Hi there, i’m new in the ‘plotly.js’ world and i was dealing with the sankey diagram.
I’d like to do a subplots of 2 different sankeys and i read in the official documentation that in every sankey data domain declaration i can define the column it belongs (as long as there is a grid-layout defined).
In the following snippet i defined everything exactly as i understood it must be done, but no grid-layout has be defined on my plot.
var data1 = {
column: 1,
type: "sankey",
orientation: "h",
node: {
line: {
color: "black"
},
label: ["el1", "el2", "el3"]
},
link: {
source : [0, 2],
target : [1, 1],
value : [120, 50],
label : ["stram1", "stream2"]
}
};
var data2 = {
column: 2,
type: "sankey",
orientation: "h",
node: {
line: {
color: "black"
},
label: ["el4", "el5", "el6"]
},
link: {
source : [0, 2],
target : [1, 1],
value : [120, 50],
label : ["stram4", "stream5"]
}
};
var data = [data1, data2];
var layout = {
title: "Title goes here",
autosize : true,
showlegend : false,
grid : {
columns : 2
}
};
Plotly.react('plotly-div', data, layout);
Is there any way to do this kind of multi sankeys subplot?
Thanks in advance,
Andrea.