area_id = $area_id; } public function makeStyles(): array { return [ '.'.CSvgGraphArea::ZBX_STYLE_CLASS => [ 'clip-path' => 'url(#'.$this->area_id.')' ], '[data-metric]' => [ 'clip-path' => 'url(#'.$this->area_id.')' ] ]; } protected function draw(): void { $this->addItem( (new CSvgPath(implode(' ', [ 'M'.$this->x.','.($this->y - 3), 'H'.($this->width + $this->x), 'V'.($this->height + $this->y), 'H'.($this->x) ]))) ); } public function toString($destroy = true) { $this ->setAttribute('id', $this->area_id) ->draw(); return parent::toString($destroy); } }