1

Line of Sankey diagram is going through one of the nodes while it should be seperate like all the other ones. Any idea why this is happening or how to prevent this?

fig = go.Figure(data=[go.Sankey(

node = dict(

  pad = 100,
  thickness = 30,

  line = dict(color = "black", width = 2),
  label = [" Gas: 47 MW",
           " Stoom: 35 MW",
           " Elektriciteit: 12 MW",
           "Verlies: 1 MW ",
           
           "R: 17 MW ",
           "F: 14 MW ",
           "Fe: 8.5 MW ",
           "Ut: 4.5 MW ",
           "VN: 4.5 MW ",
           ],

link = dict(
  source = [0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2],
  target = [1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 8],
  value = [35, 12, 1, 13.8, 11.3, 7.3, 2.8, 3.4, 2.4, 1.1, 1.5, 3.6],)])

Line with "verlies 1MW"

1 Answers1

0

i put some randoms values for the links so look at it and change them This is the code

Test
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Mar 06 '23 at 18:37
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/33953542) – Niklas Mohrin Mar 07 '23 at 21:26