Ejemplo n.º 1
0
 /**
  * Registers a type for a series or entire chart
  * @see \Altamira\JsWriter\JsWriterAbstract::setType()
  * @param string|Altamira\Type\TypeAbstract $type
  * @param array $options
  * @param string $series
  * @return \Altamira\JsWriter\JqPlot
  */
 public function setType($type, $options = array(), $series = 'default')
 {
     parent::setType($type, $options, $series);
     if ($series == 'default') {
         $rendererOptions = $this->types['default']->getRendererOptions();
         if ($renderer = $this->types['default']->getRenderer()) {
             $this->options['seriesDefaults']['renderer'] = $renderer;
         }
         if (!empty($rendererOptions)) {
             $this->options['seriesDefaults']['rendererOptions'] = $rendererOptions;
         }
     }
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Sets chart's type in the JS writer for default or for a given series.
  * @param string $type
  * @param string $seriesTitle
  * @return \Altamira\Chart provides fluent interface
  */
 public function setType($type, $seriesTitle = null)
 {
     $this->jsWriter->setType($type, $seriesTitle);
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * Sets the rendering type for this series
  * @param string $type
  * @return \Altamira\Series provides fluent interface
  */
 public function setType($type)
 {
     $this->jsWriter->setType($type, $this->getTitle());
     return $this;
 }