key( 'Page views', 10 ); $line_2 = new line_hollow( 2, 4, '#80a033' ); $line_2->key( 'Bounces', 10 ); for( $i=0; $i<12; $i++ ) { $tmp = rand(14,19); // <-- we need to remember this value for the onClick $line_1->add_link( $tmp, 'javascript:alert("Downloads, '. $x_labels[$i] .' = '. $tmp .'")' ); $tmp = rand(2,10); $line_2->add_link( $tmp, 'javascript:alert("Bounces, '. $x_labels[$i] .' = '. $tmp .'")' ); } $g = new graph(); $g->title( 'Many data lines', '{font-size: 20px; color: #736AFF}' ); $g->data_sets[] = $line_1; $g->data_sets[] = $line_2; $g->set_x_labels( $x_labels ); $g->set_x_label_style( 10, '#000000', 0, 2 ); $g->set_y_max( 20 ); $g->y_label_steps( 4 ); $g->set_y_legend( 'Open Flash Chart', 12, '#736AFF' ); echo $g->render(); ?>