[ 'legend' => [ 'display' => false, ], 'tooltip' => [ 'callbacks' => [ 'label' => RawJs::make(<<<'JS' function(context) { let label = context.dataset.label || ''; if (label) { label += ': '; } if (context.parsed.y !== null) { label += new Intl.NumberFormat('en-US', { style: 'currency', currency: 'USD' }).format(context.parsed.y); } return label; } JS), ], ], ], 'interaction' => [ 'intersect' => false, ], ]; public function getDescription(): ?string { return 'Events Moving Average'; } protected function getData(): array { $this->heading = HelperStatisticType::get($this->filters); $data = LoadEvents::load($this->filters); if ($data) { HelperMoveingAverage::get($data); } return $data; } protected function getType(): string { return 'line'; } }