jquery.gchart - Google Chart (by Keith Wood)

jquery.gchart - Google Chart (by Keith Wood)

Problem, I am generating a large number of charts. The charts have differing x-y axis (number of answers correct, time for answer in seconds, percentage - based on the chart being displayed). These are scatter charts (image below and in attachment).



The php code to generate these carts is below. In the code I attempted to  use the maxValue to set the max value of the x and y (in the .gchart('change',...) ), but if you do that after the chart is created, then it doesn't work (repaints the chart and you lose the data values). So, is there any way to set the maxValue when creating the scatter chart and setting the axis labels and values (hashmarks) when you create the scatter chart?

  1. function buildjq($scorestr,$divname,$userdata) {
      if ($userdata >= 0) $bmark =  ",$.gchart.marker('square', 'blue', 0,".$userdata." )";
      $jstring = "$('#".$divname."').gchart($.gchart.scatter([".$scorestr." ]))
        .gchart('change', {
    //        legend: 'right',
            axes: [
                   $.gchart.axis('bottom', 0,100, 'black')
    //              , $.gchart.axis('left', 0, 100, 'red')
                    ],
    //        maxValue: [$.gchart.calculate,$.gchart.calculate],
            markers: [$.gchart.marker('diamond', 'red', 0)
            ".$bmark."]});

    ";
      return $jstring; }