colours in Excel Sankey

42 views
Skip to first unread message

Tobi.K...@cat.org.uk

unread,
Mar 7, 2013, 11:07:47 AM3/7/13
to excel-r...@googlegroups.com
Hello,

I love the Excel->Sankey code (very useful for me to visualize energy flows in future energy systems...).
Ideally, I'd like to be able to assign colours to both nodes ("boxes") and links.
In the best of worlds, I would assign colours by simply changing the background colour of the Excel cell, e.g. change the colour of the cell in the "Value" column to change the colour of a particular link. But if it's easier then adding another column for an entry with the hex colour code would also be useful enough. Unfortunately I don't have much DOM/JS coding experience, looked at the code for a few hours without making much sense.
Any hints/tips would be much appreciated!

Thanks,
Tobi
Zero Carbon Britain research team

Bruce Mcpherson

unread,
Mar 7, 2013, 11:13:46 AM3/7/13
to excel-r...@googlegroups.com
Hi Tobi

Good Idea. i'll put it on my list to look at

Bruce



--
You received this message because you are subscribed to the Google Groups "Excel Liberation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excel-ramblin...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Tobi.K...@cat.org.uk

unread,
Mar 7, 2013, 11:41:42 AM3/7/13
to excel-r...@googlegroups.com

Bruce, that would be great!
Even if you can just drop a few hints on how it might work I could try and figure out the details and then share it here.
I'm not scared of code, just haven't worked much with CSS/DOM/JS stuff.
I recon I can figure out how to get the cell colour in VBA, just wouldn't know how to then set it in the JS code.

Bruce Mcpherson

unread,
Mar 7, 2013, 1:22:43 PM3/7/13
to excel-r...@googlegroups.com
actually the way it works is to create the javascript that will generate the diagram.. the code is in the parameter sheet so it can be modified as required. its tricky though. I'll probably get to it within a week.. it shold just take me about an hour


gustavo....@gmail.com

unread,
Mar 8, 2013, 12:03:19 PM3/8/13
to excel-r...@googlegroups.com, Tobi.K...@cat.org.uk
I will conform with the links with the same color like the box. As tobi said, this is an amazing tool for the study of the energy flows, Right now I am trying to draw the energetic balance of Argentina.

Bruce Mcpherson

unread,
Mar 8, 2013, 2:23:46 PM3/8/13
to excel-r...@googlegroups.com

Tobi.K...@cat.org.uk

unread,
Mar 11, 2013, 6:14:42 AM3/11/13
to excel-r...@googlegroups.com
Amazing!!!
Thank you very much! We will use this for our Zero Carbon Britain project, this is perfect!
Reply all
Reply to author
Forward
0 new messages