It should work out of the box. One gotcha is that if you have a value that is 0, the it won't take up a color slice.
See the SpeedTracer LatencyDashboard as an example: http://code.google.com/p/speedtracer/source/browse/trunk/samples/LatencyDashboard/src/com/google/speedtracer/latencydashboard/client/RightPieChart.java On Sat, Oct 23, 2010 at 3:36 PM, Killian <[email protected]> wrote: > Hi Evevery, > > First of all apologies if this isn't the correct discussion group to > answer this query. I have been looking for the gwt visualization api > group but couldn't find it. > My query is quite simple. I am trying to find a way to set the color > of specific slices inside a PieChart object. It seems to be possible > to do in js. > > http://code.google.com/apis/visualization/documentation/gallery/piechart.html > pieSliceTextStyle | {color: <string>, fontName: <string>, fontSize: > <number>} > > Hence I'm wondering if the same thing is possible with the gwt version > of the piechart? > > The only way I found to do this in the gwt version of PieChart is by > doing the following: > options.setColors( "#3399FF","#80C080","#008000","#FFFF80"); > But unfortunately this assigns colors randomly to slices. Hence I > can't control the color of particular slices > > Is there any way of doing this? > > Thanks for your help in advance > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. 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-web-toolkit?hl=en.
