Sankey Node Color and Order/Sorting

1.221 de afișări
Accesați primul mesaj necitit

bi...@signal2n.com

necitită,
17 oct. 2015, 21:24:5017.10.2015
– Google Visualization API
I've got a simple "A to B" Sankey diagram, with 50+ rows of data. So, rather than assigning a different color to each node (way too many), I would like to display one color for all of the ("From") source nodes and a second color for all of the ("To") target nodes. I feel like there's a way to do it with the colorMode, but I don't know what 'category' means or how to control it.

var options = {sankey: {node: {colorMode: 'category', colors: ['cd0000']}

I would also like to be able to sort/order the nodes in descending size. I don't think there's any way to do it in the code, but maybe some way to organize the data?

Sergey Grabkovsky

necitită,
19 oct. 2015, 09:46:2919.10.2015
– Google Visualization API
Hi Bill,

Currently the 'category' colorMode will color all the nodes the same color. In the future, we'll make it so that you can assign each node a category, and it will be colored distinctly. There's no way to automatically have all the 'From' nodes get a color and all the 'To' nodes to get another color. This is primarily because Sankey diagrams can get arbitrarily complex, and we can't provide a coloring mode that only works for this one case. I think your current best bet is indeed to assign a color to each node.

There aren't any options for node sorting currently, but I imagine that organizing your data in different ways will produce different layouts, so I would try sorting your data to see if you can get it the way you want.

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/c64c3796-dfad-4c21-af74-9d41ad96076f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

bi...@signal2n.com

necitită,
19 oct. 2015, 15:14:4519.10.2015
– Google Visualization API
Okay. Thanks for the information. Looking forward to future enhancements!

Rob Simpson

necitită,
20 sept. 2016, 13:08:5320.09.2016
– Google Visualization API


On Monday, 19 October 2015 14:46:29 UTC+1, Sergey wrote:... 

>I think your current best bet is indeed to assign a color to each node.
 
Can you point me at something that will show me how to do this?  How are the nodes indexed?

Thanks

Omer Paran

necitită,
16 nov. 2016, 04:41:5716.11.2016
– Google Visualization API
How can I assign a distinct color for a node? the only way to color nodes is using the Options and that set random colors , 

Alex navarro elenes

necitită,
12 mai 2017, 12:39:0312.05.2017
– Google Visualization API
Hi Sergey,

Could you share the link to the instructions that say how to give each node a specific color?


El lunes, 19 de octubre de 2015, 9:46:29 (UTC-4), Sergey escribió:
Hi Bill,

Currently the 'category' colorMode will color all the nodes the same color. In the future, we'll make it so that you can assign each node a category, and it will be colored distinctly. There's no way to automatically have all the 'From' nodes get a color and all the 'To' nodes to get another color. This is primarily because Sankey diagrams can get arbitrarily complex, and we can't provide a coloring mode that only works for this one case. I think your current best bet is indeed to assign a color to each node.

There aren't any options for node sorting currently, but I imagine that organizing your data in different ways will produce different layouts, so I would try sorting your data to see if you can get it the way you want.

On Sat, Oct 17, 2015 at 9:24 PM <bi...@signal2n.com> wrote:
I've got a simple "A to B" Sankey diagram, with 50+ rows of data. So, rather than assigning a different color to each node (way too many), I would like to display one color for all of the ("From") source nodes and a second color for all of the ("To") target nodes. I feel like there's a way to do it with the colorMode, but I don't know what 'category' means or how to control it.

var options = {sankey: {node: {colorMode: 'category', colors: ['cd0000']}

I would also like to be able to sort/order the nodes in descending size. I don't think there's any way to do it in the code, but maybe some way to organize the data?

--
You received this message because you are subscribed to the Google Groups "Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsub...@googlegroups.com.
Răspundeți tuturor
Răspundeți autorului
Redirecționați
0 mesaje noi