init
This commit is contained in:
38
src/components/LeftBar/substitutionCharts/Chart1.jsx
Normal file
38
src/components/LeftBar/substitutionCharts/Chart1.jsx
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
|
||||
import './Chart1.less'
|
||||
|
||||
export default class Chart7 extends Component {
|
||||
|
||||
parseData() {
|
||||
const { data } = this.props
|
||||
const name = Object.keys(data)
|
||||
const Value = Object.values(data)
|
||||
return name.map((item, index) => (
|
||||
|
||||
<div className='buttonChart7FormBorder' key={index}>
|
||||
|
||||
<div className='buttonChart7FormTxt1Border'>
|
||||
<h2 className='buttonChart7FormTxt1'>{name[index]}:</h2>
|
||||
</div>
|
||||
<div className='buttonChart7FormTxt2Border'>
|
||||
<h2 className='buttonChart7FormTxt2'>{Value[index]}</h2>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
))
|
||||
}
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className='ButtonChart7itemDetailBorder'>
|
||||
{this.parseData()}
|
||||
</div >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
44
src/components/LeftBar/substitutionCharts/Chart1.less
Normal file
44
src/components/LeftBar/substitutionCharts/Chart1.less
Normal file
@@ -0,0 +1,44 @@
|
||||
.ButtonChart7itemDetailBorder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top:-8px;
|
||||
|
||||
.buttonChart7FormBorder {
|
||||
background: url(../../../assets/ButtonChart7ItemBg.png);
|
||||
margin-top: 1.5%;
|
||||
width: 288px;
|
||||
height: 48px;
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: left;
|
||||
.buttonChart7FormTxt2Border {
|
||||
width: 30%;
|
||||
height: 100%;
|
||||
.buttonChart7FormTxt2 {
|
||||
margin-left: 20%;
|
||||
margin-right: 5%;
|
||||
margin-top: 13px;
|
||||
text-align:left;
|
||||
font-size: 15px;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
.buttonChart7FormTxt1Border {
|
||||
width: 55%;
|
||||
height: 100%;
|
||||
|
||||
.buttonChart7FormTxt1 {
|
||||
margin-top: 13px;
|
||||
margin-left: 3%;
|
||||
text-align:right;
|
||||
font-size: 15px;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
109
src/components/LeftBar/substitutionCharts/Chart2.jsx
Normal file
109
src/components/LeftBar/substitutionCharts/Chart2.jsx
Normal file
@@ -0,0 +1,109 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import './Chart2.less'
|
||||
import ReactECharts from 'echarts-for-react';
|
||||
|
||||
var data = [[320, 302, 301, 334, 390, 330, 320, 100], [120, 132, 101, 134, 90, 230, 210, 100], [220, 182, 191, 234, 290, 330, 310, 100], [150, 212, 201, 154, 190, 330, 410, 100], [320, 332, 301, 334, 290, 330, 320, 300], [320, 332, 301, 334, 290, 330, 320, 300]]
|
||||
|
||||
var name = ['烟气总量', '余氧总量', '氮氧化物排放浓度', '二氧化碳排放浓度', '颗粒物排放浓度', '烟气流速']
|
||||
|
||||
|
||||
var color = ["#2760ff", "#8167f6", "#5b9bff", "#99d66c", "#ffd160", "#ff8a40"]
|
||||
var fontColor = '#fff'
|
||||
var lineColor = 'rgba(33, 50, 89,0.8)'
|
||||
|
||||
function makeseries(data, name, color) {
|
||||
if (data) {
|
||||
let All = []
|
||||
for (let i in data) {
|
||||
All.push({
|
||||
name: name[i],
|
||||
type: 'bar',
|
||||
stack: 'total',
|
||||
barWidth: "20%",
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: color[i],
|
||||
},
|
||||
},
|
||||
label: {
|
||||
|
||||
},
|
||||
data: data[i]
|
||||
})
|
||||
}
|
||||
return All;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Chart2 extends Component {
|
||||
|
||||
|
||||
getOption = () => ({
|
||||
|
||||
legend: {
|
||||
right: "0%",
|
||||
width: "70%",
|
||||
height: "14%",
|
||||
itemWidth: 17,
|
||||
itemHeight: 13.5,
|
||||
orient: "vertical",
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: "#F1F1F3",
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: fontColor,
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: fontColor,
|
||||
},
|
||||
axisLine: {
|
||||
show:true,
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
width: 0.5,
|
||||
},
|
||||
},
|
||||
},
|
||||
series: makeseries(data, name, color)
|
||||
})
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className='LeftChart2itemDetailBorder'>
|
||||
<ReactECharts option={this.getOption()} style={{ width: '100%', height: '100%' }} />
|
||||
</div >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Chart2;
|
||||
11
src/components/LeftBar/substitutionCharts/Chart2.less
Normal file
11
src/components/LeftBar/substitutionCharts/Chart2.less
Normal file
@@ -0,0 +1,11 @@
|
||||
.LeftChart2itemDetailBorder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top:-8px;
|
||||
|
||||
|
||||
}
|
||||
120
src/components/LeftBar/substitutionCharts/Chart3.jsx
Normal file
120
src/components/LeftBar/substitutionCharts/Chart3.jsx
Normal file
@@ -0,0 +1,120 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import './Chart3.less'
|
||||
import ReactECharts from 'echarts-for-react';
|
||||
|
||||
|
||||
|
||||
var name = ['10HZ-15HZ', '15HZ-25HZ', '30HZ-35HZ', '40HZ-45HZ']
|
||||
|
||||
|
||||
var color = ["#2760ff", "#ffb70c", "#3dbdc2", "#e02094"]
|
||||
var fontColor = '#fff'
|
||||
var lineColor = 'rgba(33, 50, 89,0.8)'
|
||||
|
||||
function makeseries(data, name, color) {
|
||||
if (data) {
|
||||
let All = []
|
||||
for (let i in data) {
|
||||
All.push({
|
||||
name: name[i],
|
||||
type: 'line',
|
||||
showSymbol: false,
|
||||
symbol: "circle",
|
||||
data: data[i],
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color: color[i]
|
||||
},
|
||||
itemStyle: {
|
||||
|
||||
color: color[i],
|
||||
|
||||
},
|
||||
})
|
||||
}
|
||||
return All;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
class Chart3 extends Component {
|
||||
|
||||
|
||||
getOption = () => ({
|
||||
|
||||
title: {
|
||||
text: '风机运行频率',
|
||||
textStyle: {
|
||||
fontSize: 20,
|
||||
color: "#52FFF8"
|
||||
},
|
||||
},
|
||||
|
||||
legend: {
|
||||
right: "0%",
|
||||
width: "70%",
|
||||
height: "14%",
|
||||
itemWidth: 17,
|
||||
itemHeight: 13.5,
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: "#F1F1F3",
|
||||
},
|
||||
// itemStyle: {
|
||||
// color: "rgba(222, 9, 9, 1)"
|
||||
// },
|
||||
data: name
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '3%', containLabel: true
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['day1', 'day2', 'day3', 'day4', 'day5', 'day6', 'day7', 'day5', 'day6', 'day7', 'day6', 'day7', 'day5', 'day6', 'day7'],
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: fontColor,
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: fontColor,
|
||||
},
|
||||
axisLine: {
|
||||
show:true,
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
},
|
||||
series: makeseries(this.props.data, name, color)
|
||||
})
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className='LeftChart3itemDetailBorder'>
|
||||
<ReactECharts option={this.getOption()} style={{ width: '100%', height: '100%' }} />
|
||||
</div >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Chart3;
|
||||
9
src/components/LeftBar/substitutionCharts/Chart3.less
Normal file
9
src/components/LeftBar/substitutionCharts/Chart3.less
Normal file
@@ -0,0 +1,9 @@
|
||||
.LeftChart3itemDetailBorder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top:-8px;
|
||||
}
|
||||
126
src/components/LeftBar/substitutionCharts/Chart4.jsx
Normal file
126
src/components/LeftBar/substitutionCharts/Chart4.jsx
Normal file
@@ -0,0 +1,126 @@
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import './Chart4.less'
|
||||
import ReactECharts from 'echarts-for-react';
|
||||
|
||||
|
||||
|
||||
var name = ['10HZ-15HZ', '15HZ-25HZ', '30HZ-35HZ', '40HZ-45HZ']
|
||||
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
var color = ["#2760ff", "#ffb70c", "#3dbdc2", "#e02094"]
|
||||
var fontColor = '#fff'
|
||||
var lineColor = 'rgba(33, 50, 89,0.8)'
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class Chart3 extends Component {
|
||||
|
||||
|
||||
getOption = () => ({
|
||||
|
||||
title: {
|
||||
text: '发电量',
|
||||
top: "2%",
|
||||
textStyle: {
|
||||
fontSize: 20,
|
||||
color: "#52FFF8"
|
||||
},
|
||||
},
|
||||
|
||||
legend: {
|
||||
right: "0%",
|
||||
width: "70%",
|
||||
height: "14%",
|
||||
itemWidth: 17,
|
||||
itemHeight: 13.5,
|
||||
textStyle: {
|
||||
fontSize: 12,
|
||||
color: "#F1F1F3",
|
||||
},
|
||||
// itemStyle: {
|
||||
// color: "rgba(222, 9, 9, 1)"
|
||||
// },
|
||||
data: name
|
||||
},
|
||||
grid: {
|
||||
left: '3%',
|
||||
right: '4%',
|
||||
bottom: '0%',
|
||||
top:'30%',
|
||||
containLabel: true,
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
boundaryGap: false,
|
||||
data: ['day1', 'day2', 'day3', 'day4', 'day5', 'day6', 'day7', 'day5', 'day6', 'day7', 'day6', 'day7', 'day5', 'day6', 'day7'],
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: fontColor,
|
||||
},
|
||||
axisLine: {
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
type: 'value',
|
||||
axisLabel: {
|
||||
show: true,
|
||||
color: fontColor,
|
||||
},
|
||||
axisLine: {
|
||||
show: true,
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
splitLine: {
|
||||
lineStyle: {
|
||||
color: lineColor,
|
||||
},
|
||||
},
|
||||
},
|
||||
series: {
|
||||
|
||||
name:'发电量',
|
||||
type: 'line',
|
||||
showSymbol: true,
|
||||
symbol: "circle",
|
||||
symbolSize:8,
|
||||
symbolBorder:"rgba(17, 36, 246,0.1)",
|
||||
data: [200,320,121,125,585,213,521,326,542,258,632,145,258,632,145],
|
||||
lineStyle: {
|
||||
width: 1,
|
||||
color:"rgba(246, 23, 106,0.9)",
|
||||
},
|
||||
areaStyle: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: 'rgba(246, 23, 106,0.3)' },
|
||||
{ offset: 0.5, color: 'rgba(246, 23, 106,0.2)' },
|
||||
{ offset: 1, color: 'rgba(246, 23, 106,0.1)' }
|
||||
]),
|
||||
},
|
||||
itemStyle: {
|
||||
borderColor: '#F6176A',
|
||||
color: "rgba(4, 20, 36,0.8)",
|
||||
},
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
render() {
|
||||
return (
|
||||
<div className='LeftChart4itemDetailBorder'>
|
||||
<ReactECharts option={this.getOption()} style={{ width: '100%', height: '80%' }} />
|
||||
</div >
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default Chart3;
|
||||
9
src/components/LeftBar/substitutionCharts/Chart4.less
Normal file
9
src/components/LeftBar/substitutionCharts/Chart4.less
Normal file
@@ -0,0 +1,9 @@
|
||||
.LeftChart4itemDetailBorder {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
Reference in New Issue
Block a user