i want to show a bar chart having red in color if the value is negative and
blue or default color when the value is positive is it possible and how??
here is my code
<script type="text/javascript">
google.load("visualization", "1", {packages:["corechart"]});
google.setOnLoadCallback(drawChart1(bgroupm,bgroupf));
function drawChart1(bgroupm,bgroupf) {
var data = google.visualization.arrayToDataTable([
['Gender', 'Male','Female'],
['', bgroupm, bgroupf]]);
var options = {
title: "Gender",
hAxis: {
format: '#.00\'%\'',
titleTextStyle: {color: 'red', fontSize: 20}
},
vAxis: {
format: '#.00\'%\'',
titleTextStyle: {color: 'black', fontSize: 18}
},
legend: {
position: 'none',
textStyle: {color: 'blue', fontSize: 16}
},
backgroundColor: '#FFF',
fontSize: '10px',
series: [{color: 'blue', visibleInLegend: true}, {color: 'red',
visibleInLegend: true}]
};
var chart = new
google.visualization.BarChart(document.getElementById("columnchart_values1"));
chart.draw(data, options);
}
</script>
--
You received this message because you are subscribed to the Google Groups
"Google Chart 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 http://groups.google.com/group/google-chart-api.
For more options, visit https://groups.google.com/d/optout.