Organizational Chart - Nodes Color

3,479 views
Skip to first unread message

borutt

unread,
Feb 5, 2009, 2:04:39 AM2/5/09
to Google Visualization API
Hello everybody,

Yesterday I have implemented Organizational Chart in my home web site
but I couldn't get one thing to work.
I know that you can change nodes background color by setting "color"
in configuration options, but this change background to all nodes in
chart.

Is there a way to change background to some nodes and not to all nodes
generaly???

Thanks,
Borut Tomazin

Maksym Barbul

unread,
Feb 6, 2009, 6:03:29 AM2/6/09
to Google Visualization API
Hello, Borut.
I think the only way is to set all colors you want to use including
google default colors.
Here some of them:
#4684EE - blue
#DC3912 - red
#FF9900 - orange
#008000 - green
#666666 - grey

VizGuy

unread,
Feb 8, 2009, 2:30:31 PM2/8/09
to google-visua...@googlegroups.com
Hi,

Unfortunately you cannot change the background color of specific orgchart nodes.

You could change the html of the displayed text there to include a style="background-color: something" but that would affect only a portion
within the visual element and not the entire visual element.
Also, if you try this, be sure to add allowHtml: true to your options.

Regards,
VizGuy


2009/2/6 Maksym Barbul <maxb...@gmail.com>

borutt

unread,
Feb 9, 2009, 1:34:29 AM2/9/09
to Google Visualization API
Hello,

I have already change the text color of specific nodes, but I wanted
to do the same with nodes background.
I hope mr. G. will release a new version of OrgChart with that
option...

Thanks guys,
Borut

On Feb 8, 8:30 pm, VizGuy <viz...@google.com> wrote:
> Hi,
>
> Unfortunately you cannot change the background color of specific orgchart
> nodes.
>
> You could change the html of the displayed text there to include a
> style="background-color: something" but that would affect only a portion
> within the visual element and not the entire visual element.
> Also, if you try this, be sure to add allowHtml: true to your options.
>
> Regards,
> VizGuy
>
> 2009/2/6 Maksym Barbul <maxbar...@gmail.com>

VizGuy

unread,
Feb 9, 2009, 12:00:01 PM2/9/09
to google-visua...@googlegroups.com
Added a feature request, but I can't specify a time estimation yet.

Regards,
VizGuy


2009/2/9 borutt <borut....@gmail.com>

bhavin hirpara

unread,
Mar 30, 2013, 8:36:18 AM3/30/13
to google-visua...@googlegroups.com
 
use the #setRowProperty() method to set the background, and set the 'allowHtml' option to true

For example:

data.setRowProperty(2, 'style', 'background: #4684EE');

sets the background of row 2 to blue.

Mauricio Gerardo Ramirez Mendoza

unread,
Nov 25, 2015, 3:09:33 PM11/25/15
to Google Visualization API
Hey fellas I´m a nooby in JS and i want to know how can i set bg-color to all nodes using javascript
Reply all
Reply to author
Forward
0 new messages