-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nice to have: customizable bar colors #59
Comments
As a generalization, it would be nice to use a table column to indicate the node color, as well as a table column as the link color. Other sankey diagrams such as those in D3 or Python libraries have these sorts of properties driven by the data and not by fixed format settings, which gives the user maximum flexibility. |
Yes please. This has me going through the code here trying to see if there's an easy way to replicate the process to color the links, but doing that for the nodes instead. In the configuration/capabilities JSON file it already specifies a "Node" section in the format pane, identically to the "Links" section which allows you to change the color of each link. I think the original intent was to allow us to change the nodes, but somewhere in the process that got removed/broken. I am trying to create my own custom visual to fix for this by copying their code, but I am not sure what I'm doing at this point. |
I'm in the same boat. I have a little coding background, and I was relieved to find the source code for this visualization on github. Have you made any progress with being able to color-code the nodes manually? I'm looking for that function specifically. |
Thank you for your feedback. @jeremyfirth |
I agree with the comments above. I would find it hugely beneficial for the colouring of node bars to be a feature included in the next release. I am also new to coding and unsure how to go about doing this manually using the source code on github. |
+1 |
It would be incredibly usefull !! |
I've made some changes to the code in my fork of this repo in an effort to enable this feature. It is still experimental, but I'd love to hear feedback from anyone who tries it. If I can get some validation that it is solid, I may make a pull request to get it incorporated into the official repo. |
@joespiff It's good that community wants to help to improve the visual. Thanks! But the problem is: Power BI binds properties to data (data rows). In this case it's color. Details:
There is one row. And we can bind only one color per row. It's limitation of categorical data view mapping. But it requires rework code of sankey to switch from categorical to matrix data view mapping Probably it can be resolved by using matrix data view mapping, but I am not sure. Another tricky options is: use two different objects: one for source nodes color another for target nodes color. I hope I explained the limitations. Ask if you have questions. |
@joespiff - I'm keen to try your fork, but I cant find it? |
Please implement this by adding input data columns for the source and destination node colors, and for the link color. That's 3 input data columns in all. Trying to achieve consistent colors with this visual is currently a nightmare - it resets node colors seemingly at random. |
We'd like to color code our groups so that each one is identified by the same color across all reports, making it easy for them to spot their figures in charts.
Can the Sankey allow the colors of the bars to be set too? Ideally users would have an option to make the bars & ribbon colors match, but default would be black ribbons.
The text was updated successfully, but these errors were encountered: