#Sankey power bi download code#
Then to replace the example code you had in your question. I don't know exactly the best way to plug it in to what you're doing, but you might try generating a random hex color and plugging it in to see what comes out the other side. Ultimately I think it comes down to this one helper method: ColorUtility.parseColorString('') YellowRGB = ColorUtility.parseColorString(yellow) ĬolorUtility.calculateHighlightColor(yellowRGB, 0.8, 0.2) The following example can be found in the powerbi documentation here: import ColorUtility = It looks like if you need to inject some 3rd party color values (whether hex or some other format) you can use the ColorHelper instance at play in the code you highlighted to "cheat". Hopefully you can help me and other users of the Sankey. Hopefully it is possible to link the nodes (name) to a color instead of a theme. The colors are now based on a theme color. NodeStrokeColor = ("foreground", nodeFillColor) I think this line of code should change: nodeFillColor = ? () : (index.toString()).value The Github page with the code can be found here: When I try to do a search, I saw Microsoft Office 365. Some say we can build Sankey Chart in Microsoft Office 2016. I get to know about the Microsoft Power BI which cater for Sankey chart builder feature. But I got an error message that the string values cannot be linked to colorscale. I exploring the possibility of using Sankey chart in the company I'm working for. I looked at the colorscale function of d3 to link it to fillcolor. But probably it is easier to indicate the colors of the nodes (names) in the code itself with a hard value this would also be a nice alternative.
![sankey power bi download sankey power bi download](https://home.vizlib.com/wp-content/uploads/2019/02/sankeychart_concept_header.png)
The best solution is of course to use PowerBI to indicate the colors as in this example with the links. In this file is indicated which colors the nodes should have and what the order of the nodes should be.
![sankey power bi download sankey power bi download](https://store-images.s-microsoft.com/image/apps.38215.c20e51c9-bbd2-4039-885f-e6720609896e.e832af34-7e5b-4010-b8d5-62afbaa34bc4.89f05f17-e73b-49c3-a7b8-3aa5fcbe6308.png)
![sankey power bi download sankey power bi download](https://pafnow.com/images/blog/power-bi-sankey-chart_1200w.png)
In addition, it is also not possible to change the order of the nodes (both source and destination).Īttached is an example PowerBI file in which a sankey is displayed. The first is that it is not possible to color the nodes. The sankey diagram of PowerBI has many possibilities but as you can read on the github site there are some important limitations.