Pie slices are drawn in the order of the rows presented to the PieChart, so if you sort the data in a DataView, you can group them together that way. You can also dynamically calculate the number of slices per group and create a list of colors based on the number of slices. Here's an example: http://jsfiddle.net/asgallant/4kuFU/
On Tuesday, January 15, 2013 2:35:52 PM UTC-5, Emily Schechter wrote: > > Hi Everyone, > > Is it possible to "group" together sections of my pie chart? I have 2 main > categories, which each have about 7 smaller categories, so I was hoping to > display display 1 chart with all 14 categories in which the two overarching > groups were clearly differentiated. > > For example, if my data for how I spend my day was: > Work Activities: Answer phone (4 hours), File papers (4 hours), Leisure > Activities: Sleep (8 hours), Watch TV (8 hours) > > Could I make a chart of all 24 hours in which the Work Activities slices > were all next to each other and the Leisure Activities slices were all next > to each other, each with perhaps a different color scheme? I know that I > can change colors of slices manually but was also hoping I could pass in > something like "Type of Activity" to make them appear next to each other (+ > I'm not sure if I can even define colors manually because the number of > categories within the chart changes dynamically based on the pulled data) > > Let me know any thoughts. Thanks! > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-visualization-api/-/uLZ2tIACaegJ. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-visualization-api?hl=en.
