begin(400, 250); // Title $flashChart->title('Example 3 - Scatter: Some Random Points'); // Configure Grid style and legends $flashChart->configureGrid( array( 'x_axis' => array( 'step' => 1, 'legend' => 'Day' ), 'y_axis' => array( 'legend' => '#Hits', ) ) ); // Prepare some random data (10 points) $random_points = array(); for ($i=0; $i < 10; $i++) { // Each point is represented as a pair (x,y) $random_points[] = array('x' => $i, 'y' => rand(0,100)); } // Register each data set with its information. $data = array( 'Random Points' => array( 'color' => '#00aa42', 'font_size' => 11, 'data' => $random_points, 'graph_style' => 'scatter' ) ); $flashChart->setData($data); // Set Ranges in the chart $flashChart->setRange('y', 0, 100); $flashChart->setRange('x', 0, 10); // Show the graph echo $flashChart->render(); ?>