Hello, As the title states, I'm unable to change the chart colour for this donut chart, basically I want Slightly concerned to green, very concerned to orange and extremely concerned to red.
Wondering if anyone can tell me where I'm going wrong: <!DOCTYPE html> <html> <head> <title>Concern Levels about Cash Reserves</title> <script type="text/javascript" src= "https://www.gstatic.com/charts/loader.js"></script> <script type="text/javascript"> google.charts.load("current", {packages:["corechart"]}); google.charts.setOnLoadCallback(drawChart); function drawChart() { var data = google.visualization.arrayToDataTable([ ['Answer Choices', 'Response Percent', { role: 'style' }], ['Not concerned', 21.89, '#0000FF'], // Blue using hex code ['Slightly concerned', 42.06, '#008000'], // Green using hex code ['Very concerned', 25.75, '#FFA500'], // Orange using hex code ['Extremely concerned', 10.3, '#FF0000'] // Red using hex code ]); var options = { title: 'Concern Levels about Cash Reserves', pieHole: 0.4, }; var chart = new google.visualization.PieChart(document.getElementById( 'donutchart')); chart.draw(data, options); } </script> </head> <body> <div id="donutchart" style="width: 900px; height: 500px;"></div> </body> </html> -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/339dc3c1-3ad2-42ba-9504-a51dfc2dac71n%40googlegroups.com.
