Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
IoTSmartMeter
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
kristian.tan
IoTSmartMeter
Commits
a8cc6d26
Commit
a8cc6d26
authored
Nov 14, 2019
by
Kristian Tan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Graph styling
parent
edb90b43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
main.css
static/css/main.css
+1
-0
main.html
templates/main.html
+2
-2
No files found.
static/css/main.css
View file @
a8cc6d26
...
@@ -51,6 +51,7 @@ body {
...
@@ -51,6 +51,7 @@ body {
width
:
70%
;
width
:
70%
;
height
:
50%
;
height
:
50%
;
margin-left
:
25%
;
margin-left
:
25%
;
border-style
:
solid
;
}
}
.chart_title
{
.chart_title
{
...
...
templates/main.html
View file @
a8cc6d26
...
@@ -66,7 +66,7 @@
...
@@ -66,7 +66,7 @@
</ul>
</ul>
{#
<div
class=
"chart"
>
#}
{#
<div
class=
"chart"
>
#}
<h3
class=
"chart_title"
>
Last weeks usage
</h3>
<h3
class=
"chart_title"
>
Energy usage for the last 7 days
</h3>
<canvas
id=
"chart"
class=
"chart"
></canvas>
<canvas
id=
"chart"
class=
"chart"
></canvas>
<script>
<script>
// bar chart data
// bar chart data
...
@@ -90,7 +90,7 @@
...
@@ -90,7 +90,7 @@
}
}
// get bar chart canvas
// get bar chart canvas
var
mychart
=
document
.
getElementById
(
"
chart
"
).
getContext
(
"
2d
"
);
var
mychart
=
document
.
getElementById
(
"
chart
"
).
getContext
(
"
2d
"
);
steps
=
1
steps
=
1
;
max
=
{{
max
}}
max
=
{{
max
}}
// draw bar chart
// draw bar chart
new
Chart
(
mychart
).
Bar
(
barData
,
{
new
Chart
(
mychart
).
Bar
(
barData
,
{
...
...
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