Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Z
zh_zcb-ems
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
chen.yiwen
zh_zcb-ems
Commits
21e9788a
Commit
21e9788a
authored
Mar 07, 2023
by
chen.yiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
饼图改成曲线
parent
b1030caf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
109 additions
and
33 deletions
+109
-33
index.html
src/index.html
+1
-1
index.js
src/js/index.js
+108
-32
src改版02.zip
src/src改版02.zip
+0
-0
No files found.
src/index.html
View file @
21e9788a
...
...
@@ -175,7 +175,7 @@
<li>
热水
</li>
</ul>
</div>
<div
class=
"echarts-content"
id=
"
pi
e_chart_4"
></div>
<div
class=
"echarts-content"
id=
"
lin
e_chart_4"
></div>
</div>
</div>
...
...
src/js/index.js
View file @
21e9788a
...
...
@@ -46,36 +46,82 @@ const echart3Data = [
},
];
const
echart4Data
=
[
{
value
:
110
,
name
:
"暖通"
,
itemStyle
:
{
color
:
"#4380f0"
,
},
},
{
value
:
888
,
name
:
"照明"
,
itemStyle
:
{
color
:
"#01faf2"
,
},
},
{
value
:
222
,
name
:
"电梯"
,
itemStyle
:
{
color
:
"#eef043"
,
},
},
{
value
:
333
,
name
:
"热水"
,
itemStyle
:
{
color
:
"#c596ff"
,
},
},
];
// const echart4Data = [
// {
// value: 110,
// name: "暖通",
// itemStyle: {
// color: "#4380f0",
// },
// },
// {
// value: 888,
// name: "照明",
// itemStyle: {
// color: "#01faf2",
// },
// },
// {
// value: 222,
// name: "电梯",
// itemStyle: {
// color: "#eef043",
// },
// },
// {
// value: 333,
// name: "热水",
// itemStyle: {
// color: "#c596ff",
// },
// },
// ];
const
echart4Data
=
{
date
:
[
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
,
"7"
,
"8"
,
"9"
,
"10"
,
"11"
,
"12"
,
"13"
,
"14"
,
"15"
,
"16"
,
"17"
,
"18"
,
"19"
,
"20"
,
"21"
,
"22"
,
"23"
,
"24"
,
],
line1
:
[
100
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
190
,
250
,
100
,
90
,
100
,
],
line2
:
[
200
,
90
,
200
,
100
,
90
,
100
,
200
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
1000
,
100
,
250
,
500
,
],
line3
:
[
300
,
90
,
200
,
100
,
90
,
100
,
200
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
1000
,
100
,
250
,
400
,
],
line4
:
[
400
,
90
,
200
,
100
,
90
,
100
,
200
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
190
,
250
,
100
,
90
,
100
,
250
,
100
,
1000
,
100
,
250
,
300
,
],
};
const
echart5Data
=
{
date
:
[
...
...
@@ -509,8 +555,38 @@ const leftLineChart = () => {
};
const
rightLineChart
=
()
=>
{
const
pieChart4
=
echarts
.
init
(
document
.
getElementById
(
"pie_chart_4"
));
pieChart4
.
setOption
(
pieChartOption
(
echart4Data
,
false
,
" kW"
));
// const pieChart4 = echarts.init(document.getElementById("pie_chart_4"));
// pieChart4.setOption(pieChartOption(echart4Data, false, " kW"));
const
lineChart4
=
echarts
.
init
(
document
.
getElementById
(
"line_chart_4"
));
lineChart4
.
setOption
(
lineChartOption
(
echart4Data
.
date
,
[
{
data
:
echart4Data
.
line1
,
color
:
"#4380f0"
,
areaColor
:
[
"rgba(23,71,153, 1)"
,
"rgba(23,71,153, 0)"
],
},
{
data
:
echart4Data
.
line2
,
color
:
"#01faf2"
,
areaColor
:
[
"rgba(23,71,153, 1)"
,
"rgba(23,71,153, 0)"
],
},
{
data
:
echart4Data
.
line3
,
color
:
"#eef043"
,
areaColor
:
[
"rgba(23,71,153, 1)"
,
"rgba(23,71,153, 0)"
],
},
{
data
:
echart4Data
.
line4
,
color
:
"#c596ff"
,
areaColor
:
[
"rgba(23,71,153, 1)"
,
"rgba(23,71,153, 0)"
],
},
],
3
)
);
const
lineChart5
=
echarts
.
init
(
document
.
getElementById
(
"line_chart_5"
));
lineChart5
.
setOption
(
...
...
src/src改版02.zip
0 → 100644
View file @
21e9788a
File added
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