/**
  * Builds a new chart with the given label.
  *
  * @param  \Khill\Lavacharts\Values\Label         $chartLabel Identifying label for the chart.
  * @param  \Khill\Lavacharts\DataTables\DataTable $datatable DataTable used for the chart.
  * @param  \Khill\Lavacharts\Options              $options Options fot the chart.
  * @param  array                                  $config Array of options to set on the chart.
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function __construct(Label $chartLabel, DataTable $datatable, Options $options, $config = [])
 {
     $this->label = $chartLabel;
     $this->datatable = $datatable;
     $options->extend($this->chartDefaults);
     parent::__construct($options, $config);
 }
 /**
  * Creates a new ChartRangeUI object
  *
  * @param  array $config
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function __construct($config = [])
 {
     $options = new Options($this->defaults);
     $options->extend($this->chartRangeDefaults);
     $options->remove(['label', 'labelSeparator', 'labelStacking', 'cssClass']);
     parent::__construct($options, $config);
 }
 /**
  * Builds a new PieChart with the given label, datatable and options.
  *
  * @param  \Khill\Lavacharts\Values\Label         $chartLabel Identifying label for the chart.
  * @param  \Khill\Lavacharts\DataTables\DataTable $datatable DataTable used for the chart.
  * @param array                                   $config
  */
 public function __construct(Label $chartLabel, DataTable $datatable, $config = [])
 {
     $options = new Options($this->pieDefaults);
     if (isset($this->donutDefaults)) {
         $options->extend($this->donutDefaults);
         $options->set('pieHole', 0.5);
     }
     parent::__construct($chartLabel, $datatable, $options, $config);
 }
 /**
  * Creates the new Filter object to filter the given column label or index.
  *
  * @param  string|int $columnLabelOrIndex The column label or index to filter.
  * @param  array $config Array of options to set.
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigProperty
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function __construct($columnLabelOrIndex, $config = [])
 {
     $options = new Options($this->defaults);
     $options->extend($this->extDefaults);
     parent::__construct($options, $columnLabelOrIndex, $config);
 }
Exemple #5
0
 /**
  * Builds a new Date or Number RangeUI object.
  *
  * @param array $config Array of options to set
  * @throws \Khill\Lavacharts\Exceptions\InvalidConfigValue
  */
 public function __construct($config = [])
 {
     $options = new Options($this->defaults);
     $options->extend($this->dataRangeDefaults);
     parent::__construct($options, $config);
 }