//The code works perfectly fine and displays a scatter graph,however I have 
two sets of data and I would therefore like two different colours, one for 
each set. the first set begins with $playerx01 and the 2nd set begins with 
$player1x01. Help would be much appreciated.

<html> 
<head>
    <script type="text/javascript" 
src="https://www.google.com/jsapi";></script>
    <script type="text/javascript">
      google.load("visualization", "1", {packages:["corechart"]});
      google.setOnLoadCallback(drawChart);
      function drawChart() {
        var data = google.visualization.arrayToDataTable([
          ['Age', 'Weight'],
          [ <?php echo $playerx01;?>,      <?php echo $playery01;?>],
          [ <?php echo $playerx02;?>,      <?php echo $playery02;?>],
          [ <?php echo $playerx03;?>,      <?php echo $playery03;?>],
          [ <?php echo $playerx04;?>,      <?php echo $playery04;?>],
  [ <?php echo $playerx05;?>,      <?php echo $playery05;?>],
  
  [ <?php echo $player1x01;?>,      <?php echo $player1y01;?>],
          [ <?php echo $player1x02;?>,      <?php echo $player1y02;?>],
          [ <?php echo $player1x03;?>,      <?php echo $player1y03;?>],
          [ <?php echo $player1x04;?>,      <?php echo $player1y04;?>],
  [ <?php echo $player1x05;?>,      <?php echo $player1y05;?>]
         
         
        ]);

        var options = {
          title: 'Defence',
          hAxis: {title: '', minValue: 0, maxValue: 15},
          vAxis: {title: '', minValue: 0, maxValue: 15},
          legend: 'none',
  colors:['red','#004411']
  
        };

        var chart = new 
google.visualization.ScatterChart(document.getElementById('chart_div'));
        chart.draw(data, options);
      }
    </script>
  </head>
  <body>
    <div id="chart_div" 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 post to this group, send email to [email protected].
Visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to