If you are constantly setting up your own style of graph over and over,
then using PHP to do the grunt work is a nice option.
PHP will let you do some simple class inheritance. We create a new chart class called
my_chart and inherit from graph. Then in the constuctor we call the base class (graph) constructor
to set up all the default values. After that we overwrite some of the defaults:
create a new my_chart object, and then use it like normal.
Note how we call $g->title( 'Portreath beach' ); without setting the optional parameters. We
don't want to over write the new defaults we set in my_chart
gallery-data-11.php
<?php
// generate some random data srand((double)microtime()*1000000);
This means you don't have to set your title size and colour on each data page. You can easily add more
defaults into the my_chart object so both the X and Y axis are set to your liking.
Take a look at the PHP files to see all the default values.