Skip to content

Commit

Permalink
Fixed property access
Browse files Browse the repository at this point in the history
  • Loading branch information
asantibanez committed Aug 22, 2024
1 parent b182546 commit c30c408
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/Models/Traits/HasTitle.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ public function setTitle($title)
return $this;
}

public function getTitle()
{
return $this->title;
}

protected function initTitle()
{
$this->title = $this->defaultTitle();
Expand Down
2 changes: 1 addition & 1 deletion src/Models/TreeMapChartModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function setDistributed($distributed)

public function addBlock($title, $value, $extras = [])
{
return $this->addSeriesBlock($this->title, $title, $value, $extras);
return $this->addSeriesBlock($this->getTitle(), $title, $value, $extras);
}

public function addSeriesBlock($seriesName, $title, $value, $extras = [])
Expand Down

0 comments on commit c30c408

Please sign in to comment.