diff options
Diffstat (limited to 'docs/tutorial/tutorial_chart_font_configuration.php')
-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' ); + +?> |