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
9c004a0b
Commit
9c004a0b
authored
Jul 21, 2022
by
Kevin Yumang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SERV-2286 - barchart element WIP
parent
1b96c614
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
675 additions
and
23 deletions
+675
-23
barchart.init.js
src/Views/Limitless/Barchart/Attachments/barchart.init.js
+474
-0
BarChart.blade.php
src/Views/Limitless/Barchart/BarChart.blade.php
+20
-0
Config.php
src/Views/Limitless/Barchart/Config.php
+88
-0
Index.blade.php
src/Views/Limitless/Barchart/Documentation/Index.blade.php
+63
-0
Config.php
src/Views/Limitless/Linechart/Config.php
+30
-23
No files found.
src/Views/Limitless/Barchart/Attachments/barchart.init.js
0 → 100644
View file @
9c004a0b
This diff is collapsed.
Click to expand it.
src/Views/Limitless/Barchart/BarChart.blade.php
0 → 100644
View file @
9c004a0b
<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 }}"
is-area=
"{{ $isArea }}"
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) }}"
raw=
"{{ $raw }}"
>
</div>
</div>
\ No newline at end of file
src/Views/Limitless/Barchart/Config.php
0 → 100644
View file @
9c004a0b
<?php
/*
|------------------------------------------------------------------------------------------------
| Information
|------------------------------------------------------------------------------------------------
|
| This file is beautified by the command "sidekick:CodebeautifierCommand" of the ceetrox
| sidekick package.
|
| Author: Kevin Almond Roe Yumang <kevin.yumang@itmax.email>
| Update: 2022-07-21 01:27:31
|
*/
namespace
Ceetrox\Sidekick\Views\Limitless\Barchart
;
/*
|------------------------------------------------------------------------------------------------
| Dependencies
|------------------------------------------------------------------------------------------------
*/
use
View
;
/*
|------------------------------------------------------------------------------------------------
| Class "Config"
|------------------------------------------------------------------------------------------------
*/
class
Config
{
public
$methodAllocation
=
[
'Limitless::BarChart'
=>
'barChart'
];
public
$assetAllocation
;
/*
|--------------------------------------------------------------------------------------------
| Method "__construct"
|--------------------------------------------------------------------------------------------
*/
public
function
__construct
()
{
$this
->
assetAllocation
=
[
'Limitless::LineChart'
=>
[
'Attachments/barchart.init.js'
,
secure_url
(
'/ceetrox/sidekick/resource/public/Webdesigns/design-limitless/Template/global_assets/js/plugins/visualization/echarts/echarts.min.js'
),
]
];
}
/*
|--------------------------------------------------------------------------------------------
| Method "barChart"
|--------------------------------------------------------------------------------------------
*/
public
function
barChart
(
$parameters
)
{
return
View
(
'Limitless::Barchart.barChart'
)
->
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
)
->
withDataZoom
(
$parameters
[
'data-zoom'
]
??
false
)
->
withStacked
(
$parameters
[
'stacked'
]
??
false
)
->
withIsArea
(
$parameters
[
'is-area'
]
??
false
)
->
withAnimationDuration
(
$parameters
[
'animation-duration'
]
??
750
)
->
withYAxisLabelValueFormat
(
$parameters
[
'y-axis-label-value-format'
]
??
null
)
->
withMarkLine
(
$parameters
[
'mark-line'
]
??
null
)
->
withCategories
(
$parameters
[
'categories'
]
??
null
)
->
withSeries
(
$parameters
[
'series'
]
??
null
)
->
withRaw
(
$parameters
[
'raw'
]
??
null
);
}
}
src/Views/Limitless/Barchart/Documentation/Index.blade.php
0 → 100644
View file @
9c004a0b
{{
--
Layout
Reference
--
}}
@
extends
(
'Limitless::Help.Layout.Master'
)
@
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); on what chart index to add.
$seriesData
[]
=
$data
;
}
// json string data should be valid else it will return null
$rawData
=
'{
"xAxis":{
"type":"category",
"boundaryGap":false,
"data":["Mon","Tue","Wed","Thu","Fri","Sat","Sun"]
},
"yAxis":{
"type":"value"
},
"series":[
{
"data":[820,932,901,934,1290,1330,1320],
"type":"line",
"areaStyle":{}
}
]
}'
;
@
endphp
@
Limitless
::
CardStart
([
'title'
=>
"Basic Setup"
,
'icon'
=>
'icon-info22'
]
)
@
Limitless
::
LineChart
([
'categories'
=>
$categories
,
'series'
=>
$seriesData
,
])
@
Limitless
::
CardStop
@
Limitless
::
CardStart
([
'title'
=>
"Chart 2 (raw)"
,
'icon'
=>
'icon-info22'
]
)
@
Limitless
::
LineChart
([
'raw'
=>
$rawData
])
@
Limitless
::
CardStop
{{
--
@
Limitless
::
CardStart
([
'title'
=>
"Chart 3"
,
'icon'
=>
'icon-info22'
]
)
--
}}
{{
--
@
Limitless
::
LineChartStart
--
}}
{{
--
@
Limitless
::
LineChartStop
--
}}
{{
--
@
Limitless
::
CardStop
--
}}
@
stop
src/Views/Limitless/Linechart/Config.php
View file @
9c004a0b
...
@@ -9,8 +9,8 @@
...
@@ -9,8 +9,8 @@
| This file is beautified by the command "sidekick:CodebeautifierCommand" of the ceetrox
| This file is beautified by the command "sidekick:CodebeautifierCommand" of the ceetrox
| sidekick package.
| sidekick package.
|
|
| Author:
Marco Schmiedel <marco.schmiedel
@itmax.email>
| Author:
Kevin Almond Roe Yumang <kevin.yumang
@itmax.email>
| Update: 2022-0
6-15 10:07:09
| Update: 2022-0
7-21 01:24:33
|
|
*/
*/
namespace
Ceetrox\Sidekick\Views\Limitless\Linechart
;
namespace
Ceetrox\Sidekick\Views\Limitless\Linechart
;
...
@@ -29,22 +29,29 @@
...
@@ -29,22 +29,29 @@
| Class "Config"
| Class "Config"
|------------------------------------------------------------------------------------------------
|------------------------------------------------------------------------------------------------
*/
*/
class
Config
class
Config
{
{
public
$methodAllocation
=
[
public
$methodAllocation
=
[
'Limitless::LineChart'
=>
'lineChart'
'Limitless::LineChart'
=>
'lineChart'
];
];
public
$assetAllocation
;
public
$assetAllocation
;
/*
|--------------------------------------------------------------------------------------------
| Method "__construct"
|--------------------------------------------------------------------------------------------
*/
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
assetAllocation
=
[
$this
->
assetAllocation
=
[
'Limitless::LineChart'
=>
[
'Limitless::LineChart'
=>
[
'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'
),
]
]
];
];
}
}
...
@@ -56,21 +63,21 @@
...
@@ -56,21 +63,21 @@
public
function
lineChart
(
$parameters
)
public
function
lineChart
(
$parameters
)
{
{
return
View
(
'Limitless::Linechart.LineChart'
)
return
View
(
'Limitless::Linechart.LineChart'
)
->
withCharts
(
$parameters
[
'charts'
]
??
1
)
->
withCharts
(
$parameters
[
'charts'
]
??
1
)
->
withTitles
(
$parameters
[
'titles'
]
??
null
)
->
withTitles
(
$parameters
[
'titles'
]
??
null
)
->
withColors
(
$parameters
[
'colors'
]
??
null
)
->
withColors
(
$parameters
[
'colors'
]
??
null
)
->
withPointValues
(
$parameters
[
'point-values'
]
??
false
)
->
withPointValues
(
$parameters
[
'point-values'
]
??
false
)
->
withBoundaryGap
(
$parameters
[
'boundary-gap'
]
??
true
)
->
withBoundaryGap
(
$parameters
[
'boundary-gap'
]
??
true
)
->
withInverted
(
$parameters
[
'inverted'
]
??
false
)
->
withInverted
(
$parameters
[
'inverted'
]
??
false
)
->
withDataZoom
(
$parameters
[
'data-zoom'
]
??
false
)
->
withDataZoom
(
$parameters
[
'data-zoom'
]
??
false
)
->
withStacked
(
$parameters
[
'stacked'
]
??
false
)
->
withStacked
(
$parameters
[
'stacked'
]
??
false
)
->
withIsArea
(
$parameters
[
'is-area'
]
??
false
)
->
withIsArea
(
$parameters
[
'is-area'
]
??
false
)
->
withAnimationDuration
(
$parameters
[
'animation-duration'
]
??
750
)
->
withAnimationDuration
(
$parameters
[
'animation-duration'
]
??
750
)
->
withYAxisLabelValueFormat
(
$parameters
[
'y-axis-label-value-format'
]
??
null
)
->
withYAxisLabelValueFormat
(
$parameters
[
'y-axis-label-value-format'
]
??
null
)
->
withMarkLine
(
$parameters
[
'mark-line'
]
??
null
)
->
withMarkLine
(
$parameters
[
'mark-line'
]
??
null
)
->
withCategories
(
$parameters
[
'categories'
]
??
null
)
->
withCategories
(
$parameters
[
'categories'
]
??
null
)
->
withSeries
(
$parameters
[
'series'
]
??
null
)
->
withSeries
(
$parameters
[
'series'
]
??
null
)
->
withRaw
(
$parameters
[
'raw'
]
??
null
);
->
withRaw
(
$parameters
[
'raw'
]
??
null
);
}
}
...
...
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