Location: PHPKode > projects > TVEz - Media Library > tvez-0.2.1/html/shared/Graph/examples/bar_graph_3.php
<?php

	include("../BarGraph.php");

	$plot = new BarGraph(400,250,"Example Bar Graph (Gradient)");

	$plot->set_data( array (
		"Aug 2001" => 17,
		"Sep 2001" => 9,
		"Oct 2001" => 13,
		"Nov 2001" => 4,
		"Dec 2001" => 11
	) );

	$plot->set_bgcolor("#dddddd");
	$plot->set_plot_bgcolor("white");

	$plot->set_x_axis_title("Years");
	$plot->set_y_axis_title("Number of apples");
#	$plot->set_x_axis_label_font(2);
#	$plot->set_x_axis_show_grid(true);
#	$plot->set_x_axis_label_up(true);

	$plot->set_margin(1,5,1,1);
	$plot->set_x_axis_position("bottom");
	$plot->set_y_axis_min_value(5);
	$plot->set_y_axis_max_value(20);
	$plot->set_y_axis_num_ticks(3);
	$plot->set_y_axis_show_grid(true);

	$plot->set_bar_spacing(3);
#	$plot->set_bar_gradient(false);
	$plot->set_bar_border_color("black");

	$plot->draw();
Return current item: TVEz - Media Library