Was this option ever added? Seems like a rather must have
On Thursday, July 28, 2011 at 2:29:41 AM UTC-4, Viz Kid wrote: > > > You raise a good point. We will consider adding the option to have > specific color assigned to specific slices. > > Viz Kid > > On Tue, Jul 26, 2011 at 5:44 PM, John Everett <evere...@gmail.com > <javascript:>> wrote: > >> Thanks Riccardo, >> >> I appreciate the quick reply. >> >> The reason I asked about specifically assigning a color to a particular >> data point >> is due to the fact that the chart API will not list zero value entries in >> the legend. >> >> The colors array works well except in cases where zero values are present. >> >> When comparing two or more charts, having a zero value data item in the >> legend >> but not in the chart is very valuable. >> >> I am currently setting the sliceVisibilityThreshold option to a very >> small number and assigning >> zero value entries to a value of 0.1 in order to have them appear in the >> legend. This is a bit of a kludge >> but it generates the intended figure as long as no one mouses over the >> 0.1 slivers. >> >> - John >> >> >> >> >> 2011/7/26 Riccardo Govoni ☢ <battl...@gmail.com <javascript:>> >> >>> You can pass an array to the 'colors' options of your piechart. For >>> example: >>> >>> new >>> google.visualization.PieChart(document.getElementById('visualization')). >>> draw(data, { >>> title:"So, how was your day?", >>> colors: ['#254180', '#3054a6', '#4970ca', '#6889d3', '#c7d3ee'] >>> }); >>> >>> as shown in this example: >>> http://savedbythegoog.appspot.com/?id=ff295e96d6c44cf8bf2e241b5368db0bb7f64a2c >>> >>> Each entry in the colors array defines the color of a slice. >>> There is no way, as far as I know, of overriding only the color of some >>> slices and using the default ones for others. >>> >>> /R. >>> >>> On 25 July 2011 22:09, Everett <evere...@gmail.com <javascript:>> wrote: >>> >>>> Dear group, >>>> >>>> I can not find and example of assigning a specific colors to specific >>>> slices >>>> in a pie chart. Can the color be defined in a new column? eg add >>>> another column >>>> to the code below. >>>> >>>> best, >>>> - John >>>> >>>> <CODE> >>>> <script type="text/javascript" src="https://www.google.com/jsapi"></ >>>> script> >>>> <script type="text/javascript"> >>>> >>>> google.load('visualization', '1.0', {'packages':['corechart']}); >>>> google.setOnLoadCallback(drawChart1); >>>> >>>> function drawChart1() >>>> { >>>> var data = new google.visualization.DataTable(); >>>> data.addColumn('string', 'Stage'); >>>> data.addColumn('number', 'distinct actions'); >>>> data.addRows([ >>>> ['OUTREACH', 25], >>>> ['OTHER', 99], >>>> ['TF', 881], >>>> ]); >>>> >>>> ... >>>> } >>>> >>>> </CODE> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups "Google Visualization API" group. >>>> To post to this group, send email to google-visua...@googlegroups.com >>>> <javascript:>. >>>> To unsubscribe from this group, send email to >>>> google-visualization-api+unsubscr...@googlegroups.com <javascript:>. >>>> For more options, visit this group at >>>> http://groups.google.com/group/google-visualization-api?hl=en. >>>> >>>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Google Visualization API" group. >>> To post to this group, send email to google-visua...@googlegroups.com >>> <javascript:>. >>> To unsubscribe from this group, send email to >>> google-visualization-api+unsubscr...@googlegroups.com <javascript:>. >>> For more options, visit this group at >>> http://groups.google.com/group/google-visualization-api?hl=en. >>> >> >> >> >> -- >> _______________________________________________ >> John K. Everett, Ph.D. >> NESG project manager >> Northeast Structural Genomics Consortium (NESG) >> Rutgers University >> http://www.nesg.org >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Google Visualization API" group. >> To post to this group, send email to google-visua...@googlegroups.com >> <javascript:>. >> To unsubscribe from this group, send email to >> google-visualization-api+unsubscr...@googlegroups.com <javascript:>. >> For more options, visit this group at >> http://groups.google.com/group/google-visualization-api?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Google Visualization API" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-visualization-api+unsubscr...@googlegroups.com. To post to this group, send email to google-visualization-api@googlegroups.com. Visit this group at https://groups.google.com/group/google-visualization-api. To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/3525586b-456a-4f9a-91a2-c87559926fcf%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.