public function setPositionDistributionChartsData() { $html = []; $barChart = new \App\BarChart(); foreach ($this->modelData['posDist'] as $posDataKey => $posDataValues) { $barChart->setConfig(['element' => 'dashboard-posdis' . $posDataKey, 'xkey' => 'posData', 'ykeys' => "['posAnzahl']", 'labels' => "['Anzahl Keywords']", 'barRatio' => '0.4', 'xLabelAngle' => '0', 'hideHover' => 'auto', 'resize' => 'true']); $barChart->setDataString($this->preparePosDisDataForBarChart($posDataValues['data'][0])); $html[] = $barChart->generate(); } $this->viewData['rankingLineJSData'] = implode("\n", $html); }
public function createBarChartJSData() { $barChart = new \App\BarChart(); $barChart->setConfig(['element' => 'dashboard-posdis', 'xkey' => 'posData', 'ykeys' => "['posAnzahl']", 'labels' => "['Anzahl Keywords']", 'barRatio' => '0.4', 'xLabelAngle' => '0', 'hideHover' => 'auto', 'resize' => 'true']); $barChart->setDataString($this->preparePosDisDataForBarChart()); $this->viewData['positionDistributionJSData'] = $barChart->generate(); }