Exemplo n.º 1
0
 /**
  * Allows us to configure bar direction for renderer
  * (non-PHPdoc)
  * @see \Altamira\Type\TypeAbstract::setOption()
  * @param string $name
  * @param mixed $value
  * @return \Altamira\JsWriter\JqPlot\Bar
  */
 public function setOption($name, $value)
 {
     if (in_array($name, array('horizontal', 'vertical'))) {
         $this->options['barDirection'] = $name;
     }
     return parent::setOption($name, $value);
 }
Exemplo n.º 2
0
 /**
  * Abstracts out option setting and registers the required options based on what's provided.
  * @see \Altamira\Type\TypeAbstract::setOption()
  * @param string $name
  * @param mixed $value
  * @return \Altamira\Type\Flot\Bar
  */
 public function setOption($name, $value)
 {
     switch ($name) {
         case 'horizontal':
             $this->options['bars']['horizontal'] = $value;
             break;
         case 'stackSeries':
             $this->pluginFiles[] = 'jquery.flot.stack.js';
             $this->options['series']['stack'] = true;
             break;
         case 'fillColor':
             $this->options['series']['bars']['fillColor']['colors'] = $value;
             break;
         default:
             parent::setOption($name, $value);
     }
     return $this;
 }