Reputation: 16002
I can explode the first slice in a google pie chart using the options below.
var options = {
title: 'My Daily Activities',
// set the slice threshold, slices below are all put in the 'Other' category.
sliceVisibilityThreshold: .015,
// explode the first (0) slice, I need to explode the 'Other' slice.
slices: { 0: { offset: 0.5 } },
is3D: true,
};
My question is how do I find the index of the 'other' slice to explode that?
I am happy to do it programmatically after the chart is drawn. I tried -1 and 'other', but that doesn't work.
Obviously one needs to obtain the number of slices from the graph once the threshold calculation has been performed by the visualisation API.
Upvotes: 0
Views: 1650
Reputation: 16068
Unfortunately there is no way to change the residue slice offset, or at least it does not say so in the documentation. There is an option to change pieResidueSliceLabel
and pieResidueSliceColor
, but no pieResidueSliceOffset
You could try playing around with sliceVisibilityThreshold
, which sets the threshold for the slices that are grouped into others, but would need to make an issue to get a pieResidueSliceOffset option
Upvotes: 1