Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
GeoInt_SIDT
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mario Chirinos Colunga
GeoInt_SIDT
Commits
8506409f
Commit
8506409f
authored
Mar 29, 2019
by
Sergio Adrian Gongora Euan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
buble chart changed by stacked bar chart
parent
b44620bd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
reportImg.js
reports/static/reports/js/reportImg.js
+11
-5
aside.html
reports/templates/aside.html
+2
-2
No files found.
reports/static/reports/js/reportImg.js
View file @
8506409f
...
...
@@ -146,12 +146,18 @@ function change(newType) {
}
// Chart.js modifies the object you pass in. Pass a copy of the object so we can use the original object later
var
temp
=
jQuery
.
extend
(
true
,
{},
config
);
temp
.
type
=
newType
;
if
(
newType
==
'radar'
||
newType
==
'pie'
||
newType
==
'polarArea'
||
newType
==
'doughnut'
)
{
temp
.
options
.
scales
.
xAxes
=
{
"display"
:
false
};
temp
.
options
.
scales
.
yAxes
=
{
"display"
:
false
};
var
temp
=
jQuery
.
extend
(
true
,
{},
config
);
if
(
newType
==
"stackedBar"
){
temp
.
type
=
"bar"
;
temp
.
options
.
scales
.
xAxes
=
[{
"stacked"
:
true
}];
temp
.
options
.
scales
.
yAxes
=
[{
"stacked"
:
true
}];
}
else
{
temp
.
type
=
newType
;
if
(
newType
==
'radar'
||
newType
==
'pie'
||
newType
==
'polarArea'
||
newType
==
'doughnut'
)
{
temp
.
options
.
scales
.
xAxes
=
[{
"display"
:
false
,
"stacked"
:
false
}];
temp
.
options
.
scales
.
yAxes
=
[{
"display"
:
false
,
"stacked"
:
false
}];
}
}
myChart
=
new
Chart
(
ctx
,
temp
);
...
...
reports/templates/aside.html
View file @
8506409f
...
...
@@ -65,9 +65,9 @@
</a>
</li>
<li>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('
bubble
')"
>
<a
class=
"treeview submenu"
href=
"#"
onclick=
"change('
stackedBar
')"
>
<i
class=
"fa fa-bar-chart"
></i>
<span>
Bubble
Chart
</span>
<span>
Stacked Bar
Chart
</span>
<span
class=
"pull-right-container"
>
<span
class=
"label label-primary pull-right"
></span>
</span>
...
...
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