I'm having trouble figuring out how to change the color of data points
on a line chart. For example, I want the line to be black with big
red data points. I've tried chm and chco but I can't get them to have
any effect.
<script type="text/javascript">
google.load("visualization", "1", {packages:
["corechart"]});
function drawLoadChart() {
var data = new google.visualization.DataTable();
data.addColumn('number', 'Length');
data.addColumn('number', 'Load');
data.addRows([
[0, 0],
[x1, P1],
[x2, P2]
]);
var formatter = new
google.visualization.NumberFormat({fractionDigits: 3});
formatter.format(data,0);
var options = {
title: 'Load vs Length',
titlePosition: 'out',
legend:{position:'none'},
hAxis: {title: 'Length (inch)', viewWindow:{min:
0}, format: '#.000'},
vAxis: {title: 'Load (pound)', viewWindow:{min:
0}},
series: {0: {color: 'black', lineWidth: 2,
pointSize:5}},
chco: '00FF00,FF00FF'
};
var loadChart = new
google.visualization.LineChart(document.getElementById('line_chart'));
loadChart.draw(data, options);
}
</script>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" 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-visualization-api?hl=en.