diff options
Diffstat (limited to 'modules/Visualization/ChartPie.php')
-rw-r--r-- | modules/Visualization/ChartPie.php | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/modules/Visualization/ChartPie.php b/modules/Visualization/ChartPie.php new file mode 100644 index 0000000000..b4a6e5cdfc --- /dev/null +++ b/modules/Visualization/ChartPie.php @@ -0,0 +1,32 @@ +<?php +require_once "Visualization/Chart.php"; +class Piwik_Visualization_ChartPie extends Piwik_Visualization_Chart +{ + function getDefaultLimit() + { + return 5; + } + function customizeGraph() + { + $this->prepareData(); +// $this->title( 'PIE Chart', '{font-size: 20px;}' ); + + // + $this->pie(60,'#505050','#000000'); + // + // pass in two arrays, one of data, the other data labels + // + $this->pie_values( $this->arrayData, $this->arrayLabel ); + // + // Colours for each slice, in this case some of the colours + // will be re-used (3 colurs for 5 slices means the last two + // slices will have colours colour[0] and colour[1]): + // + $this->pie_slice_colours( array('#d01f3c','#356aa0','#C79810') ); + + + $this->set_tool_tip( '#x_label# <br>#val# visits ' ); + + } + +}
\ No newline at end of file |