Skip to content

Commit

Permalink
because of axes font sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
mlantz committed Sep 29, 2023
1 parent a0b7071 commit 31d6896
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/Builder/Chart.php
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,11 @@ class Chart

public $data;

public $axesAttributes = [
'x-font-size' => 14,
'y-font-size' => 14,
];

public $titleAttributes = [
'font_family' => "'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
'font_size' => 14,
Expand Down Expand Up @@ -331,6 +336,11 @@ public function handler()
'display' => ($this->displayAxes && $this->displayXAxis),
'beginAtZero' => $this->beginAtZero,
'grace' => $this->grace,
'ticks' => [
'font' => [
'size' => $this->axesAttributes['x-font-size']
],
]
],
'y' => [
'title' => [
Expand All @@ -340,6 +350,11 @@ public function handler()
'display' => ($this->displayAxes && $this->displayYAxis),
'beginAtZero' => $this->beginAtZero,
'grace' => $this->grace,
'ticks' => [
'font' => [
'size' => $this->axesAttributes['y-font-size']
],
]
],
],
'plugins' => [
Expand Down

0 comments on commit 31d6896

Please sign in to comment.