public function __construct() { parent::__construct(); JS::add('/js/Chart.min.js', false); JS::startup('lightning.stats.init()'); // Prepare the JS. JS::set('chart.' . $this->id . '.renderer', $this->renderer); JS::set('chart.' . $this->id . '.url', '/' . Request::getLocation()); JS::set('chart.' . $this->id . '.params.start', ['source' => 'start']); JS::set('chart.' . $this->id . '.params.number_format', $this->numberFormat); JS::set('chart.' . $this->id . '.params.diff', !empty($this->diff)); if (!empty($this->data)) { JS::set('chart.' . $this->id . '.data', $this->data); } JS::set('chart.' . $this->id . '.ajax', $this->ajax); }
public function execute() { // Setup the template. $template = Template::getInstance(); $template->set('table', $this); $template->set('content', 'table'); // Call the appropriate execution handler. parent::execute(); }