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
3a926a8f
Commit
3a926a8f
authored
Jul 18, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - linked backend/frontend data to js file. (parameters) WIP
parent
ef8a4d9e
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
205 additions
and
108 deletions
+205
-108
linechart.init.js
src/Views/Limitless/Linechart/Attachments/linechart.init.js
+128
-78
Chart.blade.php
src/Views/Limitless/Linechart/Chart.blade.php
+16
-0
Config.php
src/Views/Limitless/Linechart/Config.php
+18
-18
Index.blade.php
src/Views/Limitless/Linechart/Documentation/Index.blade.php
+43
-7
Start.blade.php
src/Views/Limitless/Linechart/Start.blade.php
+0
-5
Stop.php
src/Views/Limitless/Linechart/Stop.php
+0
-0
No files found.
src/Views/Limitless/Linechart/Attachments/linechart.init.js
View file @
3a926a8f
This diff is collapsed.
Click to expand it.
src/Views/Limitless/Linechart/Chart.blade.php
0 → 100644
View file @
3a926a8f
<div
class=
"chart-container"
>
<div
class=
"chart has-fixed-height LimitlessLineChart"
charts=
"{{ $charts }}"
titles=
"{{ json_encode($titles) }}"
colors=
"{{ json_encode($colors) }}"
point-values=
"{{ $pointValues }}"
boundary-gap=
"{{ $boundaryGap }}"
inverted=
"{{ $inverted }}"
data-zoom=
"{{ $dataZoom }}"
stacked=
"{{ $stacked }}"
animation-duration=
"{{ $animationDuration }}"
@
if
($
yAxisLabelValueFormat
!=
null
)
y-axis-label-value-format=
"{{ $yAxisLabelValueFormat }}"
@
endif
@
if
($
markLine
!=
null
)
mark-line=
"{{ $markLine }}"
@
endif
categories=
"{{ json_encode($categories) }}"
series=
"{{ json_encode($series) }}"
>
src/Views/Limitless/Linechart/Config.php
View file @
3a926a8f
...
@@ -32,8 +32,7 @@
...
@@ -32,8 +32,7 @@
class
Config
class
Config
{
{
public
$methodAllocation
=
[
public
$methodAllocation
=
[
'Limitless::LineChartStart'
=>
'lineChartStart'
,
'Limitless::Chart'
=>
'chart'
'Limitless::LineChartStop'
=>
'LineChartStop'
,
];
];
public
$assetAllocation
;
public
$assetAllocation
;
...
@@ -41,7 +40,7 @@
...
@@ -41,7 +40,7 @@
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
assetAllocation
=
[
$this
->
assetAllocation
=
[
'Limitless::
LineChartSt
art'
=>
[
'Limitless::
Ch
art'
=>
[
'Attachments/linechart.init.js'
,
'Attachments/linechart.init.js'
,
secure_url
(
'/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/plugins/visualization/echarts/echarts.min.js'
),
secure_url
(
'/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/plugins/visualization/echarts/echarts.min.js'
),
]
]
...
@@ -51,24 +50,25 @@
...
@@ -51,24 +50,25 @@
/*
/*
|--------------------------------------------------------------------------------------------
|--------------------------------------------------------------------------------------------
| Method "
lineChartSt
art"
| Method "
ch
art"
|--------------------------------------------------------------------------------------------
|--------------------------------------------------------------------------------------------
*/
*/
public
function
lineChartSt
art
(
$parameters
)
public
function
ch
art
(
$parameters
)
{
{
return
View
(
'Limitless::Linechart.Start'
);
return
View
(
'Limitless::Linechart.Chart'
)
->
withCharts
(
$parameters
[
'charts'
]
??
1
)
}
->
withTitles
(
$parameters
[
'titles'
]
??
null
)
->
withColors
(
$parameters
[
'colors'
]
??
null
)
->
withPointValues
(
$parameters
[
'point-values'
]
??
false
)
/*
->
withBoundaryGap
(
$parameters
[
'boundary-gap'
]
??
true
)
|--------------------------------------------------------------------------------------------
->
withInverted
(
$parameters
[
'inverted'
]
??
false
)
| Method "LineChartStop"
->
withDataZoom
(
$parameters
[
'data-zoom'
]
??
false
)
|--------------------------------------------------------------------------------------------
->
withStacked
(
$parameters
[
'stacked'
]
??
false
)
*/
->
withAnimationDuration
(
$parameters
[
'animation-duration'
]
??
750
)
public
function
LineChartStop
(
$parameters
)
->
withYAxisLabelValueFormat
(
$parameters
[
'y-axis-label-value-format'
]
??
null
)
{
->
withMarkLine
(
$parameters
[
'mark-line'
]
??
null
)
return
View
(
'Limitless::Linechart.Stop'
);
->
withCategories
(
$parameters
[
'categories'
]
??
null
)
->
withSeries
(
$parameters
[
'series'
]
??
null
);;
}
}
...
...
src/Views/Limitless/Linechart/Documentation/Index.blade.php
View file @
3a926a8f
...
@@ -3,16 +3,52 @@
...
@@ -3,16 +3,52 @@
@
section
(
'Limitless::Content'
)
@
section
(
'Limitless::Content'
)
@
php
// sample backend data
$categories
=
[
'Jan'
,
'Feb'
,
'Mar'
,
'Apr'
,
'May'
,
'Jun'
,
'July'
,
'Aug'
,
'Sep'
,
'Oct'
,
'Nov'
,
'Dec'
];
$series
=
[
'ONC'
,
'APR'
,
'SPR'
,
'PHX'
,
'SIG'
,
'BRG'
,
'MNT'
,
'SDK'
,
'OCT'
];
$seriesData
=
[];
foreach
(
$series
as
$s
)
{
$data
[
'name'
]
=
$s
;
$dataArray
=
[];
foreach
(
$categories
as
$c
)
{
$dataArray
[]
=
rand
(
1
,
100
);
}
$data
[
'data'
]
=
$dataArray
;
$data
[
'index'
]
=
0
;
//rand(0,1);
$seriesData
[]
=
$data
;
}
@
endphp
@
Limitless
::
CardStart
([
'title'
=>
"Description"
,
'icon'
=>
'icon-info22'
]
)
@
Limitless
::
CardStart
([
'title'
=>
"Description"
,
'icon'
=>
'icon-info22'
]
)
@
Limitless
::
LineChartStart
@
Limitless
::
Chart
([
'titles'
=>
'Sample 1'
,
'charts'
=>
1
,
'colors'
=>
[
'#5470c6'
,
'#91cc75'
,
'#fac858'
,
'#ee6666'
,
'#73c0de'
,
'#3ba272'
,
'#fc8452'
,
'#9a60b4'
,
'#ea7ccc'
,
'#a1887f'
],
'point-values'
=>
true
,
'boundary-gap'
=>
true
,
'inverted'
=>
true
,
'data-zoom'
=>
true
,
'stacked'
=>
true
,
'animation-duration'
=>
1000
,
'y-axis-label-value-format'
=>
'{value} users'
,
'mark-line'
=>
'average'
,
'categories'
=>
$categories
,
'series'
=>
$seriesData
])
@
Limitless
::
CardStop
@
Limitless
::
CardStop
@
Limitless
::
CardStart
([
'title'
=>
"Chart 2"
,
'icon'
=>
'icon-info22'
]
)
{{
--
@
Limitless
::
CardStart
([
'title'
=>
"Chart 2"
,
'icon'
=>
'icon-info22'
]
)
--
}}
@
Limitless
::
LineChartStart
{{
--
@
Limitless
::
Chart
--
}}
@
Limitless
::
CardStop
{{
--
@
Limitless
::
CardStop
--
}}
@
Limitless
::
CardStart
([
'title'
=>
"Chart 3"
,
'icon'
=>
'icon-info22'
]
)
{{
--
@
Limitless
::
CardStart
([
'title'
=>
"Chart 3"
,
'icon'
=>
'icon-info22'
]
)
--
}}
@
Limitless
::
LineChartStart
{{
--
@
Limitless
::
LineChartStart
--
}}
@
Limitless
::
CardStop
{{
--
@
Limitless
::
LineChartStop
--
}}
{{
--
@
Limitless
::
CardStop
--
}}
@
stop
@
stop
src/Views/Limitless/Linechart/Start.blade.php
deleted
100644 → 0
View file @
ef8a4d9e
<div
class=
"chart-container"
>
<div
class=
"chart has-fixed-height LimitlessLineChart"
>
</div>
</div>
\ No newline at end of file
src/Views/Limitless/Linechart/Stop.php
deleted
100644 → 0
View file @
ef8a4d9e
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