'ezcGraphPieChart', 'line' => 'ezcGraphLineChart', ); /** * create * * @param string $type Type of chart to create * @param array $options Options to create the chart with * @throws ezcGraphUnknownChartTypeException * @return ezcGraphChart */ static public function create( $type, $options = array() ) { $type = strtolower( $type ); if ( isset( self::$chartTypes[$type] ) ) { $className = self::$chartTypes[$type]; return new $className( $options ); } else { throw new ezcGraphUnknownChartTypeException($type); } } /** * Creates a palette from given name * * @param string $name Name of the palette * @return ezcGraphPalette Created palette */ static public function createPalette( $name ) { $className = 'ezcGraphPalette' . $name; if ( class_exists( $className ) ) { return new $className(); } else { throw new ezcGraphUnknownPaletteException( $name ); } } } ?>