Charts - landrisek/impala GitHub Wiki

Add graph $graph = new MyGraph implements Impala\IGraph; $this->builder->graph($graph); IChart::chart public class MyChart implements Impala\IChart {     public function chart(array $spice, array $row): array {     $date = date('Y-m-d', strtotime($row['date']));     $last = date('Y-m-d', strtotime("+1 month", strtotime($row['date'])));     $orders = [];     $prices = [];     while($date < $last) {         $orders[] = ['x' => intval(date('d', strtotime($date))), 'y' => $this->myModel->getOrders($date)];         $prices[] = ['x' => intval(date('d', strtotime($date))), 'y' => $this->myModel->getPrices($date)];         $date = date('Y-m-d', strtotime("+1 day", strtotime($date)));     }     return [$orders, $prices];     } } More info about npm implementation Impala is using library eact-easy-chart