PluginProbe
Visualizer – Tables & Charts Manager with Built-in AI Generator / 3.5.1
Visualizer – Tables & Charts Manager with Built-in AI Generator v3.5.1
4.0.8 4.0.7 4.0.6 4.0.5 4.0.4 4.0.3 3.0.5 3.0.6 3.0.7 3.0.8 3.0.9 3.1.0 3.1.1 3.1.2 3.1.3 3.10.0 3.10.1 3.10.10 3.10.11 3.10.12 3.10.13 3.10.14 3.10.15 3.10.2 3.10.3 All 149 releases
visualizer / vendor / phpoffice / phpspreadsheet / src / PhpSpreadsheet / Chart / PlotArea.php

PlotArea.php in Visualizer – Tables & Charts Manager with Built-in AI Generator 3.5.1, at vendor/phpoffice/phpspreadsheet/src/PhpSpreadsheet/Chart/PlotArea.php

113 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace PhpOffice\PhpSpreadsheet\Chart;
4
5 use PhpOffice\PhpSpreadsheet\Worksheet\Worksheet;
6
7 class PlotArea
8 {
9 /**
10 * PlotArea Layout.
11 *
12 * @var Layout
13 */
14 private $layout;
15
16 /**
17 * Plot Series.
18 *
19 * @var DataSeries[]
20 */
21 private $plotSeries = [];
22
23 /**
24 * Create a new PlotArea.
25 *
26 * @param null|Layout $layout
27 * @param DataSeries[] $plotSeries
28 */
29 public function __construct(Layout $layout = null, array $plotSeries = [])
30 {
31 $this->layout = $layout;
32 $this->plotSeries = $plotSeries;
33 }
34
35 /**
36 * Get Layout.
37 *
38 * @return Layout
39 */
40 public function getLayout()
41 {
42 return $this->layout;
43 }
44
45 /**
46 * Get Number of Plot Groups.
47 *
48 * @return array of DataSeries
49 */
50 public function getPlotGroupCount()
51 {
52 return count($this->plotSeries);
53 }
54
55 /**
56 * Get Number of Plot Series.
57 *
58 * @return int
59 */
60 public function getPlotSeriesCount()
61 {
62 $seriesCount = 0;
63 foreach ($this->plotSeries as $plot) {
64 $seriesCount += $plot->getPlotSeriesCount();
65 }
66
67 return $seriesCount;
68 }
69
70 /**
71 * Get Plot Series.
72 *
73 * @return array of DataSeries
74 */
75 public function getPlotGroup()
76 {
77 return $this->plotSeries;
78 }
79
80 /**
81 * Get Plot Series by Index.
82 *
83 * @param mixed $index
84 *
85 * @return DataSeries
86 */
87 public function getPlotGroupByIndex($index)
88 {
89 return $this->plotSeries[$index];
90 }
91
92 /**
93 * Set Plot Series.
94 *
95 * @param DataSeries[] $plotSeries
96 *
97 * @return PlotArea
98 */
99 public function setPlotSeries(array $plotSeries)
100 {
101 $this->plotSeries = $plotSeries;
102
103 return $this;
104 }
105
106 public function refresh(Worksheet $worksheet)
107 {
108 foreach ($this->plotSeries as $plotSeries) {
109 $plotSeries->refresh($worksheet);
110 }
111 }
112 }
113