Visualization OrgChart how to set height width change border color

2,552 views
Skip to first unread message

panore

unread,
May 8, 2009, 3:09:57 AM5/8/09
to Google Visualization API, cha...@cybersurfindia.com
Hello friends,

I am using the Visualization OrgChart.

The chart displays nicely but creates formating issues in IE and
Firefox as well as i wants to set the height, width ,border color of
the box and line color of the chart.

If somebody knows then help me.

regards
sunil

Ken Bobel

unread,
May 8, 2009, 9:06:12 AM5/8/09
to Google Visualization API
Sunil -

You can control the size and height of the box by using CSS styles and
standard HTML tags within the second column. e.g. you could have
something like this:

'<table width="200"><tr><td nowrap align="center"><span
class="captionHeader">Department Head</span></td></tr></table>'

You can also change the color of the boxes as well as the color of
when they are clicked by changing the parameters in the draw method as
follows:

table.draw(data, {allowHtml:true, allowCollapse:true, size:'medium',
color:"#cccccc", selectionColor:"yellow"} );

In the above example, the color of the boxes would be gray and the
click color of a box would be yellow.

As for the color of the chart; that is the line color around the box
and the connecting lines, I am not sure how this can be set without
downloading the source and just changing the source code through
styles.

Hope this helps!

- Ken Bobel

VizBoy

unread,
May 12, 2009, 10:00:43 AM5/12/09
to google-visua...@googlegroups.com
Hi Sunil,

You can set the various options for the OrgChart through the second parameter to the draw() function, as with every visualization.

The various options are documented here:

http://code.google.com/apis/visualization/documentation/gallery/orgchart.html#Configuration_Options

Unfortunately, not everything you want is supported, for instance, line color is not one of the options.

Regards,
     VizBoy.
Reply all
Reply to author
Forward
0 new messages