Hi! I need to set a specific colour (and/or point size) for each point
of my graph, I'm using this code (taken directly from the official
examples):

[code]
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('number', 'Age');
        data.addColumn('number', 'Weight');
        data.addRows(6);
        data.setValue(0, 0, 8);
        data.setValue(0, 1, 12);
        data.setValue(1, 0, 4);
        data.setValue(1, 1, 5.5);
        data.setValue(2, 0, 11);
        data.setValue(2, 1, 14);
        data.setValue(3, 0, 4);
        data.setValue(3, 1, 4.5);
        data.setValue(4, 0, 3);
        data.setValue(4, 1, 3.5);
        data.setValue(5, 0, 6.5);
        data.setValue(5, 1, 7);

        var chart = new
google.visualization.ScatterChart(document.getElementById('chart_div'));
        chart.draw(data, {width: 400, height: 240,
                          title: 'Age vs. Weight comparison',
                          hAxis: {title: 'Age', minValue: 0, maxValue:
15},
                          vAxis: {title: 'Weight', minValue: 0,
maxValue: 15},
                          series: {
                              0:{color: 'blue', pointSize: '3',
visibleInLegend: true},
                              1:{color: 'black', pointSize: '3',
visibleInLegend: true},
                              2:{color: 'red', pointSize: '3',
visibleInLegend: true},
                              3:{color: 'red', pointSize: '3',
visibleInLegend: true},
                              4:{color: 'red', pointSize: '3',
visibleInLegend: true},
                              5:{color: 'red', pointSize: '3',
visibleInLegend: true}
                          },
                          legend: 'none'
                         });
      }
[/code]

But in this way every point is blue.
If I change the value for the serie 0 from blue to black, every point
became black!

Is possible to change the color of every point indipendently?

-- 
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.

Reply via email to