diff options
author | Kore Nordmann <github@kore-nordmann.de> | 2008-08-20 11:10:02 +0000 |
---|---|---|
committer | Kore Nordmann <github@kore-nordmann.de> | 2008-08-20 11:10:02 +0000 |
commit | cc24ba1a3e2bb75ce751a7ec72d140a6582ecf2c (patch) | |
tree | 7eae31b768d5ec8c6f90c7fe76ba02a1155d3729 /docs/tutorial | |
parent | 59e15d56899406f7cff4fd3eae3a370410e0c898 (diff) | |
download | zetacomponents-graph-cc24ba1a3e2bb75ce751a7ec72d140a6582ecf2c.zip zetacomponents-graph-cc24ba1a3e2bb75ce751a7ec72d140a6582ecf2c.tar.gz |
- More documentation improvements
# There is still some way to go...
Diffstat (limited to 'docs/tutorial')
-rw-r--r-- | docs/tutorial/tutorial_chart_font_configuration.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/docs/tutorial/tutorial_chart_font_configuration.php b/docs/tutorial/tutorial_chart_font_configuration.php new file mode 100644 index 0000000..a564f62 --- /dev/null +++ b/docs/tutorial/tutorial_chart_font_configuration.php @@ -0,0 +1,29 @@ +<?php + +require_once 'tutorial_autoload.php'; + +$graph = new ezcGraphPieChart(); +$graph->palette = new ezcGraphPaletteEzBlue(); +$graph->title = 'Access statistics'; + +// Set the maximum font size to 8 for all chart elements +$graph->options->font->maxFontSize = 8; + +// Set the font size for the title independently to 14 +$graph->title->font->maxFontSize = 14; + +// The following only affects all elements except the // title element, +// which now has its own font configuration. +$graph->options->font->name = 'serif'; + +$graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( + 'Mozilla' => 19113, + 'Explorer' => 10917, + 'Opera' => 1464, + 'Safari' => 652, + 'Konqueror' => 474, +) ); + +$graph->render( 400, 150, 'tutorial_chart_font_configuration.svg' ); + +?> |