sankey
3 TopicsMicrosoft Sankey Visual: How can I prevent destination nodes being automatically reordered?
Hi all, I'm using the Microsoft Sankey visual in Power BI Desktop and would like to keep the node order consistent between the left and right sides of the chart. My source data is structured as: From To Value Apples Apples 45 Apples Pears 7 Pears Fig 26 Fig Cherry 115 Cherry Cherry 13 Intended category order: Apple Pear Fig Cherry However, the Sankey visual automatically changes the order of the destination nodes presumably to reduce flow crossings. I have already tried: Creating a numeric sort column (1 = Severe, 2 = Moderate, 3 = Mild, 4 = Normal renal function) Using Sort by Column on the destination field (To) Creating a separate Category/SortOrder lookup table Sorting both the source data and lookup table correctly Disabling Auto links reorder in the visual settings Power BI accepts the sort order without errors, but the Sankey visual continues to reorder the destination nodes. Manually dragging is not ideal, as the freehand movement does not allow precision. My questions are: Does the Microsoft Sankey visual support a fixed destination node order? Is there a supported way to force the same category order on both sides of the Sankey Any advice would be greatly appreciated. Thanks![help] sankey image can't be displayed in poweBI
Hi team, I have below script. import pandas as pd import chart_studio.plotly as py import plotly.graph_objects as go labelListTemp1 = list(set(dataset.source.values)) labelListTemp2 = list(set(dataset.target.values)) labelList = labelListTemp1 + labelListTemp2 sankey_node = list(dict.fromkeys(labelList)) fig = go.Figure(data=[go.Sankey( node = dict( pad=15, thickness=20, line = dict(color = "black", width = 0.5), label = labelList, color = "blue" ), link = dict(source = dataset.source.apply(lambda x: labelList.index(x)), target = dataset.target.apply(lambda x: labelList.index(x)), value = dataset.value))]) fig.show() And I run it in powerBI with enabling python script. but the result is that the code opened a browser and displayed the sankey in browser, instead of in powerBI. 1. the code opened a browser and displayed the sankey in browser. 2. I would like the sankey chart displayed in powerBI, but powerBI says that 'the visual can't be displayed'. Is there anyone that succesfully created sankey chart by python plotly lib? can any expert help take a look what's wrong here? Thanks, Cherie841Views0likes0CommentsProblem with Sankey visual % Weight
I have downloaded the sankey visual 1.10.0 from the Marketplace but it appears to me that the precentage weight isn't accurately show the difference between flows. From the source to destination I have flows ranging from 0.5 to 4 to 46% but the flow widths are a similar size for 0.5% and 4% and the 46% flow isn't much wider than either of them. My flow precentages are (0.5%, 0.5%, 4%, 4%, 41%, 46%) If I don't have a precentage count calculation on the weight I get more realistic thicknesses but I would like to see the % that flows from source to destination Am I using the Sankey correctly?2.3KViews0likes5Comments