How do I set the colors? I'm using Google Charts, to graph a population 
based on its gender. I would like Famale to be in red and Male in blue.

        <script type="text/javascript">  
                google.charts.load('current', {'packages':['corechart']});  
                google.charts.setOnLoadCallback(drawChart);  
                function drawChart()  
                {  
                        var data = google.visualization.arrayToDataTable([  
                                ['status', 'number'],  
                                <?php  
                                while($row = mysqli_fetch_array(
$resultHastaHoy))  
                                {  
                                        echo "['".$row["status"]."', ".$row[
"number"]."],";  
                                }  
                                ?>  
                                ]);  
                        var options = {  
                                title: 'SEXO',  
                                is3D:true,  
                                pieHole: 0.4,
                                colors: ['#5cb85c','#f0ad4e']
                        };  
                        var chart = new google.visualization.PieChart(
document.getElementById('piechart'));  
                        chart.draw(data, options);  
                }  
        </script>  


I need to do, something like this!:

colors: ['Masculino':'#5cb85c','Femenino':'#f0ad4e']


Thanks!!

-- 
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 [email protected].
To post to this group, send email to [email protected].
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/3ea8000c-ddb2-40c1-a7f7-b701fce6710b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to