Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
S
sidekick
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Privat - Marco Schmiedel
sidekick
Commits
b36b438c
Commit
b36b438c
authored
Aug 01, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - refactor chart title attribute
parent
f07c170c
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
19 deletions
+9
-19
ChartDataManager.php
src/Managers/ChartManager/ChartDataManager.php
+8
-0
BarChartData.php
src/Views/Limitless/Barchart/Attachments/BarChartData.php
+0
-8
Index.blade.php
src/Views/Limitless/Linechart/Documentation/Index.blade.php
+1
-0
PieChartData.php
src/Views/Limitless/Piechart/Attachments/PieChartData.php
+0
-8
Index.blade.php
src/Views/Limitless/Piechart/Documentation/Index.blade.php
+0
-3
No files found.
src/Managers/ChartManager/ChartDataManager.php
View file @
b36b438c
...
...
@@ -3,6 +3,7 @@ namespace Ceetrox\Managers\ChartManager;
Class
ChartDataManager
{
private
?
string
$title
;
private
array
$categories
;
private
Series
$series
;
private
?
int
$numberOfCharts
;
...
...
@@ -16,6 +17,7 @@ Class ChartDataManager {
public
function
__construct
()
{
$this
->
title
=
null
;
$this
->
categories
=
[];
$this
->
series
=
new
Series
();
$this
->
numberOfCharts
=
null
;
...
...
@@ -33,6 +35,11 @@ Class ChartDataManager {
return
new
SeriesData
();
}
public
function
setTitle
(
string
$value
)
{
$this
->
title
=
$value
;
}
public
function
setColors
(
$color
)
{
if
(
is_array
(
$color
))
{
...
...
@@ -89,6 +96,7 @@ Class ChartDataManager {
$data
=
[];
if
(
!
is_null
(
$this
->
title
))
$data
[
'title'
]
=
$this
->
title
;
if
(
!
is_null
(
$this
->
numberOfCharts
))
$data
[
'charts'
]
=
$this
->
numberOfCharts
;
if
(
count
(
$this
->
series
)
>
0
)
$data
[
'series'
]
=
$this
->
series
->
toArray
();
if
(
count
(
$this
->
categories
)
>
0
)
$data
[
'categories'
]
=
$this
->
categories
;
...
...
src/Views/Limitless/Barchart/Attachments/BarChartData.php
View file @
b36b438c
...
...
@@ -5,7 +5,6 @@ use Ceetrox\Managers\ChartManager\ChartDataManager;
Class
BarChartData
extends
ChartDataManager
{
private
?
string
$title
;
private
?
bool
$isHorizontal
;
private
?
bool
$showBarValues
;
...
...
@@ -13,7 +12,6 @@ Class BarChartData extends ChartDataManager {
{
parent
::
__construct
();
$this
->
title
=
null
;
$this
->
isHorizontal
=
null
;
$this
->
showBarValues
=
null
;
}
...
...
@@ -23,11 +21,6 @@ Class BarChartData extends ChartDataManager {
return
new
self
;
}
public
function
setTitle
(
string
$value
)
{
$this
->
title
=
$value
;
}
public
function
setIsHorizontal
(
bool
$value
)
{
$this
->
isHorizontal
=
$value
;
...
...
@@ -50,7 +43,6 @@ Class BarChartData extends ChartDataManager {
$data
=
[];
if
(
!
is_null
(
$this
->
title
))
$data
[
'title'
]
=
$this
->
title
;
if
(
!
is_null
(
$this
->
isHorizontal
))
$data
[
'horizontal'
]
=
$this
->
isHorizontal
;
if
(
!
is_null
(
$this
->
showBarValues
))
$data
[
'barValues'
]
=
$this
->
showBarValues
;
...
...
src/Views/Limitless/Linechart/Documentation/Index.blade.php
View file @
b36b438c
...
...
@@ -30,6 +30,7 @@
$chartDataManager
->
setIsStacked
(
false
);
$chartDataManager
->
setShowPointValues
(
true
);
$chartDataManager
->
setTitle
([
'A'
,
'B'
,
'C'
]);
$dataObject
=
$chartDataManager
->
toJson
();
...
...
src/Views/Limitless/Piechart/Attachments/PieChartData.php
View file @
b36b438c
...
...
@@ -5,7 +5,6 @@ use Ceetrox\Managers\ChartManager\ChartDataManager;
Class
PieChartData
extends
ChartDataManager
{
private
?
string
$title
;
private
?
string
$subtitle
;
private
?
string
$pieType
;
private
?
bool
$hasLabel
;
...
...
@@ -15,7 +14,6 @@ Class PieChartData extends ChartDataManager {
{
parent
::
__construct
();
$this
->
title
=
null
;
$this
->
subtitle
=
null
;
$this
->
pieType
=
null
;
$this
->
hasLabel
=
null
;
...
...
@@ -27,11 +25,6 @@ Class PieChartData extends ChartDataManager {
return
new
self
;
}
public
function
setTitle
(
string
$value
)
{
$this
->
title
=
$value
;
}
public
function
setSubtitle
(
string
$value
)
{
$this
->
subtitle
=
$value
;
...
...
@@ -64,7 +57,6 @@ Class PieChartData extends ChartDataManager {
$data
=
[];
if
(
!
is_null
(
$this
->
title
))
$data
[
'title'
]
=
$this
->
title
;
if
(
!
is_null
(
$this
->
subtitle
))
$data
[
'subtitle'
]
=
$this
->
subtitle
;
if
(
!
is_null
(
$this
->
pieType
))
$data
[
'pieType'
]
=
$this
->
pieType
;
if
(
!
is_null
(
$this
->
hasLabel
))
$data
[
'label'
]
=
$this
->
hasLabel
;
...
...
src/Views/Limitless/Piechart/Documentation/Index.blade.php
View file @
b36b438c
...
...
@@ -27,9 +27,6 @@
$chartDataManager
->
addSeries
(
$sd
);
$chartDataManager
->
setIsHorizontal
(
true
);
$chartDataManager
->
setShowBarValues
(
true
);
$dataObject
=
$chartDataManager
->
toJson
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment