Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
E
energyai_vue
Project
Project
Details
Activity
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
葛齐林
energyai_vue
Commits
e38f0869
Commit
e38f0869
authored
Apr 12, 2021
by
xiexingan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交
parent
4f0afbe9
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
2 deletions
+98
-2
chart.vue
src/pages/home/chart.vue
+93
-0
page.vue
src/pages/home/page.vue
+5
-2
No files found.
src/pages/home/chart.vue
0 → 100644
View file @
e38f0869
<
template
lang=
'pug'
>
#chart(:style="{ width: '100%', height: '90%' }")
</
template
>
<
script
>
export
default
{
mounted
()
{
this
.
chart
()
},
methods
:
{
chart
()
{
let
dom
=
document
.
getElementById
(
'chart'
)
if
(
!
dom
)
return
let
myCharts
=
this
.
$echarts
.
init
(
dom
)
let
option
=
{
// color:['#D0F0FF'],
title
:
{
text
:
'温度'
},
tooltip
:
{
trigger
:
'axis'
},
grid
:
{
left
:
'3%'
,
bottom
:
'3%'
,
containLabel
:
true
},
xAxis
:
[
{
// type: 'category',
type
:
'time'
,
boundaryGap
:
false
}
],
yAxis
:
[
{
type
:
'value'
}
],
series
:
[
{
name
:
'订单数量'
,
type
:
'line'
,
stack
:
'总量'
,
smooth
:
true
,
// label: {
// show: true,
// position: 'top'
// },
areaStyle
:
{
normal
:
{
color
:
new
this
.
$echarts
.
graphic
.
LinearGradient
(
0
,
0
,
0
,
1
,
[
{
offset
:
0
,
color
:
'#21ACFC'
// 0% 处的颜色
},
{
offset
:
1
,
color
:
'#fff'
// 100% 处的颜色
}
])
}
},
lineStyle
:
{
color
:
'#21ACFC'
},
itemStyle
:
{
normal
:
{
color
:
'#13B0FF'
}
},
emphasis
:
{
focus
:
'series'
},
data
:
[
[
'2019-8-14 8:00:00'
,
70
],
[
'2019-8-14 8:00:01'
,
60
],
[
'2019-8-14 8:00:02'
,
30
],
[
'2019-8-14 8:00:03'
,
79
],
[
'2019-8-14 8:00:06'
,
10
],
[
'2019-8-14 8:00:20'
,
31
]
]
}
]
}
myCharts
.
setOption
(
option
)
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
</
style
>
src/pages/home/page.vue
View file @
e38f0869
...
...
@@ -93,7 +93,8 @@
</el-col>
</el-row>
<div
style=
"height: calc(100% - 130px)"
>
<energy-total-charts></energy-total-charts>
<!--
<energy-total-charts></energy-total-charts>
-->
<chart></chart>
</div>
</div>
</card-list>
...
...
@@ -114,13 +115,15 @@
import
cardList
from
'../components/cardList'
import
energyTotalCharts
from
'../components/energyTotalCharts'
import
myPies
from
'../components/myPies'
import
chart
from
'./chart'
// import CardList from './compontents/cardList.vue';
export
default
{
name
:
'home'
,
components
:
{
cardList
,
energyTotalCharts
,
myPies
myPies
,
chart
},
data
()
{
return
{
...
...
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