Hi Khrys, colorMode: 'unique' will assign a unique color for each node. It is, in fact, now the default, so setting that option won't do anything. I can see how this is somewhat confusing, but you have to set the colorMode to 'category' in order to get a single color for all nodes, and then you have to specify the color you want in the 'colors' option. The reason for this is that each node is implicitly assigned a category, but since there's no way to specify a node's category, all nodes just get assigned the same category. Eventually we'll expose some method of assigning node categories, but that will require us to support passing in multiple data tables to Sankey.
Here is a jsfiddle I made that does what (I think) you want: https://jsfiddle.net/o9vc6yzy/1/ On Thursday, April 23, 2015 at 10:23:35 AM UTC-4, Khrys wrote: > > Thanks Daniel. I really appreciate your work. > > With the new version, how can I get only one color in sankey? I tried the > colorMode: unique but couldn't get this to work. > > Thanks. > > https://jsfiddle.net/Khrys/o9vc6yzy/ > -- 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 [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/google-visualization-api. For more options, visit https://groups.google.com/d/optout.
