public static function factory($type, $properties)
    {
        switch ($type) {
            case 'evolution':
                return new JqplotDataGenerator\Evolution($properties, $type);
            case 'pie':
            case 'bar':
                return new JqplotDataGenerator($properties, $type);
            default:
                throw new Exception("Unknown JqplotDataGenerator type '$type'.");
        }
    }
public static function factory($type, $properties)
    {
        switch ($type) {
            case 'evolution':
                return new JqplotDataGenerator\Evolution($properties, $type);
            case 'pie':
            case 'bar':
                return new JqplotDataGenerator($properties, $type);
            default:
                throw new Exception("Unknown JqplotDataGenerator type '$type'.");
        }
    }
public static function factory ( $ type , $ properties ) { switch ( $ type ) { case 'evolution' : return new JqplotDataGenerator \ Evolution ( $ properties , $ type ) ; case 'pie' : case 'bar' : return new JqplotDataGenerator ( $ properties , $ type ) ; default : throw new Exception ( "Unknown JqplotDataGenerator type '$type'." ) ; } }
Creates a new JqplotDataGenerator instance for a graph type and view properties.

@param string $type 'pie', 'bar', or 'evolution'
@param array $properties The view properties.
@throws \Exception
@return JqplotDataGenerator
Creates a new JqplotDataGenerator instance for a graph type and view properties .