Re: PieChart slice shadow

732 views
Skip to first unread message

asgallant

unread,
Sep 26, 2012, 1:04:57 PM9/26/12
to google-visua...@googlegroups.com
There is no option to remove the "shadow" of the highlighted slice, but with a little digging into the SVG/VML structure of the charts, you can remove them: http://jsfiddle.net/asgallant/Hx4Vd/

Note that this solution depends on the current implementation of the API, and is not guaranteed to work in future revisions.  If the team changes the organization of the SVG/VML code, this will need to be updated to match.

On Wednesday, September 26, 2012 4:31:35 AM UTC-4, Raimond Tunnel wrote:
Hi

How to remove the shadow that appears under the slice of a PieChart when hovering?
I could not find any information about that from the API.
https://developers.google.com/chart/interactive/docs/gallery/piechart?hl=zh-CN

When hovering a slice I want the tooltip to show, but not the shadow.

Also there's a typo in your API:

slices: [{color: 'black', {}, {}, {color: 'red'}]

There's a missing } from the first element.

Raimond Tunnel

unread,
Sep 27, 2012, 2:35:32 AM9/27/12
to google-visua...@googlegroups.com
Thank you for the answer.

Yes, I understand the risks of using that solution. Are there any plans of adding an option to disable the highlight shadow in the future?
It would also be nice if there would be an option to disable the click-select for the slices.
I would guess that it's pretty common just to want a plain pie chart without any bells and whistles. Tooltips can be disabled, so why not the other triggers?

Also, I know that this would not be recommended, but what if I force the Visualization version to be 1.30 (not 1 that will call 1.31 right now). Would this guarantee that the underlying SVG will not change?

asgallant

unread,
Sep 27, 2012, 10:35:03 AM9/27/12
to google-visua...@googlegroups.com
I don't know what the chart team's plans are, but you can make a feature request here.

The version numbers are a new thing (I actually didn't know they were up and running until a few days ago) that we have requested for a long time.  If they are implemented correctly, then yes, the SVG structure would stay the same.  In general, I would recommend against using an old version by default - the versioning system is mainly needed so that we can revert to old versions if a crippling bug pops up in a new version.

asgallant

unread,
Sep 27, 2012, 5:04:13 PM9/27/12
to google-visua...@googlegroups.com
That would be useful, yes.

On Thursday, September 27, 2012 2:33:14 PM UTC-4, trybka wrote:
We do not have any plans to snapshot every version, however if this is generally useful, we may consider it.

Please keep in mind that we can only offer support for versions 1 and 1.1 (beta). 

FYI -- The most recent available "version" is 1.30 which was frozen at the end of May 2012.

I would not recommend relying on any old versions by default, but yes, they can help you if a crippling bug is accidentally released.

Raimond Tunnel

unread,
Sep 28, 2012, 2:38:57 AM9/28/12
to google-visua...@googlegroups.com
Trybka, you said that the most recent version is 1.30 (May 2012). What about the 24th September release? Visigoth said in the release's topic that the newest is 1.32. Although I mistakenly wrote that the current is 1.31.

But, ok, my biggest concern was the highlight shadow and the click-select of the PieChart's slices. And the stability of implementing a listener that removes those things from the SVG. I guess these are answered, thanks.

trybka

unread,
Sep 28, 2012, 10:39:15 AM9/28/12
to google-visua...@googlegroups.com
The 24th Sep release -- 1.32 is the "current" release -- it's not accessible via the package loader except as 1 or 1.0.

1.31 is not accessible anymore. (If you look at what file is loaded when you request 1.31, you will see that 1.1 is fetched -- must be a quirk in the jsapi loader).

-trybka
Reply all
Reply to author
Forward
0 new messages