Re: Styling of legend and tooltips

135 views
Skip to first unread message

asgallant

unread,
Oct 11, 2012, 12:04:31 PM10/11/12
to google-visua...@googlegroups.com
The API doesn't support any of these.

In theory, you could write code that modifies the SVG/VML for the legend to change the color of the text (and maybe replace the squares with circles), but doing so might prove prohibitively difficult.

For the tooltips, you can change the contents of the box to an extent, but you can't split it up into multiple boxes if you want to use focusTarget "category".

I wrote a hack that adds a vertical line that follows the mouse, but the tooltips don't work at all if you use this: http://jsfiddle.net/asgallant/xwrVV/5/

On Thursday, October 11, 2012 10:11:35 AM UTC-4, Martin Treml wrote:
Hi!

I'm just started to use the google visualization API and after a time of learning i got stuck in styling my legend and tooltips.

I'm using an AreaChart with focusTarget on category.
Maybe someone could help me with my problems.

Legend:
is it possible to change the rectangles to circles
is it possible to change the text color to the same as the indicator (rectangle)

Tooltips: 
is it possible to display only the value aside an point, and not all in one box, similar to this one http://www.amcharts.com/javascript/line-chart-with-multiple-value-axes/
is it possible to display a line who overlaps in the middle of each point in the whole height of the chart
 
 
best regards,
Treml Martin

Jonah Werre

unread,
Apr 24, 2014, 1:32:01 PM4/24/14
to google-visua...@googlegroups.com
I know this post is over a year old but I did this to change my legend rectangles to circles (please excuse my jQuery):


    $google_chart.find('svg g:first-of-type g rect:last-of-type ').attr('rx':30, 'ry':30)
Reply all
Reply to author
Forward
0 new messages