original_string: 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'.");
          }
      }
code: 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'.");
          }
      }
code_tokens: 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'." ) ; } }
docstring: 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
docstring_tokens: Creates a new JqplotDataGenerator instance for a graph type and view properties .