colour( '#BF3B69'); $bar->key('Gemiddelde energieverbruik van gisteren in Watt', 14); $bar->set_values( $data ); $bar->set_on_click("bar_1"); $bar->set_colour('#f7921c'); //-- Y AXIS --\\ $y = new y_axis(); $y->set_range( 0, 50, 10 ); $y->set_colour('#000000'); $y->set_grid_colour('#D8D8D8'); //-- X AXIS --\\ $x = new x_axis(); $x->colour('#000000')->grid_colour('#D8D8D8'); $x_legend = new x_legend( 'Kamer nummer' ); $x_legend->set_style( '{font-size: 14px; color: #000000}' ); $x_labels = new x_axis_labels(); $x_labels->set_colour( '#000000' ); $x_labels->set_labels( $xaxis ); $x->set_labels( $x_labels ); //--CHART --\\ $chart = new open_flash_chart(); $chart->set_title( $title ); $chart->set_x_legend( $x_legend ); $chart->set_x_axis( $x ); $chart->set_y_axis( $y ); $chart->add_element( $bar ); $chart->set_bg_colour( '#FFFFFF' ); echo $chart->toPrettyString(); $chartwrite = $chart->toPrettyString(); $fh = fopen("graphs/bar.txt", 'w') or die("can't open file"); fwrite($fh, $chartwrite); fclose($fh); ?>