|
|
|
@ -946,7 +946,7 @@ const barChartAndLineChartFour = function (data, id) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 折线图
|
|
|
|
// 折线图
|
|
|
|
const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
|
|
|
|
const lineChart = function (data, id, unit = '', smooth = false, color = '#14bd2d') {
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
|
data = {
|
|
|
|
data = {
|
|
|
|
@ -976,13 +976,13 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
legend: {
|
|
|
|
top: '5%',
|
|
|
|
top: '5%',
|
|
|
|
itemWidth:20,
|
|
|
|
itemWidth: 20,
|
|
|
|
itemHeight:10,
|
|
|
|
itemHeight: 10,
|
|
|
|
itemStyle:{
|
|
|
|
itemStyle: {
|
|
|
|
borderWidth:1,
|
|
|
|
borderWidth: 1,
|
|
|
|
borderHeight:1,
|
|
|
|
borderHeight: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
formatter:function (val) {
|
|
|
|
formatter: function (val) {
|
|
|
|
return `${val} `
|
|
|
|
return `${val} `
|
|
|
|
},
|
|
|
|
},
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
@ -1010,7 +1010,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
yAxis: [
|
|
|
|
yAxis: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name:'合格率',
|
|
|
|
name: '合格率',
|
|
|
|
min: (min - 2 < 0) ? 0 : min - 2,
|
|
|
|
min: (min - 2 < 0) ? 0 : min - 2,
|
|
|
|
max: (max + 2 > 100) ? 100 : max + 2,
|
|
|
|
max: (max + 2 > 100) ? 100 : max + 2,
|
|
|
|
type: 'value',
|
|
|
|
type: 'value',
|
|
|
|
@ -1031,7 +1031,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
axisLabel: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
interval:0,
|
|
|
|
interval: 0,
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
color: '#ffffff',
|
|
|
|
color: '#ffffff',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -1042,7 +1042,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: data.yDataName,
|
|
|
|
name: data.yDataName,
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
smooth:smooth,
|
|
|
|
smooth: smooth,
|
|
|
|
showAllSymbol: true, //显示所有图形。
|
|
|
|
showAllSymbol: true, //显示所有图形。
|
|
|
|
symbol: 'circle', //标记的图形为实心圆
|
|
|
|
symbol: 'circle', //标记的图形为实心圆
|
|
|
|
symbolSize: 4, //标记的大小
|
|
|
|
symbolSize: 4, //标记的大小
|
|
|
|
@ -1079,7 +1079,7 @@ const lineChart = function (data, id, unit = '',smooth=false,color='#14bd2d') {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const lineChartTwo = function (data, id, unit = '') {
|
|
|
|
const lineChartTwo = function (data, id, unit = '') {
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
let color = ['#3094ea','#2fd032','#6ba72c','#7b6931','#8909E5']
|
|
|
|
let color = ['#3094ea', '#2fd032', '#6ba72c', '#7b6931', '#8909E5']
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
|
data = {
|
|
|
|
data = {
|
|
|
|
xName: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
|
|
|
xName: ["1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"],
|
|
|
|
@ -1098,7 +1098,7 @@ const lineChartTwo = function (data, id, unit = '') {
|
|
|
|
let num = data.yData.map(val => val.data).flat(Infinity)
|
|
|
|
let num = data.yData.map(val => val.data).flat(Infinity)
|
|
|
|
let min = Math.ceil(Math.min(...num))
|
|
|
|
let min = Math.ceil(Math.min(...num))
|
|
|
|
let max = Math.ceil(Math.max(...num))
|
|
|
|
let max = Math.ceil(Math.max(...num))
|
|
|
|
let series = data.yData.map((val,index) => {
|
|
|
|
let series = data.yData.map((val, index) => {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
name: val.name,
|
|
|
|
name: val.name,
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
@ -1150,14 +1150,15 @@ const lineChartTwo = function (data, id, unit = '') {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
legend: {
|
|
|
|
top: '5%',
|
|
|
|
top: '5%',
|
|
|
|
itemWidth:20,
|
|
|
|
itemWidth: 20,
|
|
|
|
itemHeight:10,
|
|
|
|
itemHeight: 10,
|
|
|
|
formatter:function (val) {
|
|
|
|
formatter: function (val) {
|
|
|
|
return `${val}`
|
|
|
|
return `${val}`
|
|
|
|
},
|
|
|
|
},
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
color: () => {},
|
|
|
|
color: () => {
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
xAxis: {
|
|
|
|
xAxis: {
|
|
|
|
@ -1210,7 +1211,7 @@ const lineChartTwo = function (data, id, unit = '') {
|
|
|
|
charts.setOption(option);
|
|
|
|
charts.setOption(option);
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
const lineChartThree = function (data, id, unit = '', smooth = false) {
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
|
data = {
|
|
|
|
data = {
|
|
|
|
@ -1221,8 +1222,8 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
yDataTwoName: "百分比"
|
|
|
|
yDataTwoName: "百分比"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
let min = Math.ceil(Math.min(...data.yData,...(data.yDataTwo || [])))
|
|
|
|
let min = Math.ceil(Math.min(...data.yData, ...(data.yDataTwo || [])))
|
|
|
|
let max = Math.ceil(Math.max(...data.yData,...(data.yDataTwo || [])))
|
|
|
|
let max = Math.ceil(Math.max(...data.yData, ...(data.yDataTwo || [])))
|
|
|
|
let option = {
|
|
|
|
let option = {
|
|
|
|
grid: {
|
|
|
|
grid: {
|
|
|
|
top: '28%',
|
|
|
|
top: '28%',
|
|
|
|
@ -1242,13 +1243,13 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
legend: {
|
|
|
|
top: '5%',
|
|
|
|
top: '5%',
|
|
|
|
itemWidth:20,
|
|
|
|
itemWidth: 20,
|
|
|
|
itemHeight:10,
|
|
|
|
itemHeight: 10,
|
|
|
|
itemStyle:{
|
|
|
|
itemStyle: {
|
|
|
|
borderWidth:1,
|
|
|
|
borderWidth: 1,
|
|
|
|
borderHeight:1,
|
|
|
|
borderHeight: 1,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
formatter:function (val) {
|
|
|
|
formatter: function (val) {
|
|
|
|
return `${val} `
|
|
|
|
return `${val} `
|
|
|
|
},
|
|
|
|
},
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
@ -1276,7 +1277,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
yAxis: [
|
|
|
|
yAxis: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name:'(元/台)',
|
|
|
|
name: '(元/台)',
|
|
|
|
min: (min - 2 < 0) ? 0 : min - 2,
|
|
|
|
min: (min - 2 < 0) ? 0 : min - 2,
|
|
|
|
max: (max + 2 > 100) ? 100 : max + 2,
|
|
|
|
max: (max + 2 > 100) ? 100 : max + 2,
|
|
|
|
type: 'value',
|
|
|
|
type: 'value',
|
|
|
|
@ -1297,7 +1298,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
},
|
|
|
|
},
|
|
|
|
axisLabel: {
|
|
|
|
axisLabel: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
interval:0,
|
|
|
|
interval: 0,
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
color: '#ffffff',
|
|
|
|
color: '#ffffff',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -1308,7 +1309,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: data.yDataName,
|
|
|
|
name: data.yDataName,
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
smooth:smooth,
|
|
|
|
smooth: smooth,
|
|
|
|
showAllSymbol: true, //显示所有图形。
|
|
|
|
showAllSymbol: true, //显示所有图形。
|
|
|
|
symbol: 'circle', //标记的图形为实心圆
|
|
|
|
symbol: 'circle', //标记的图形为实心圆
|
|
|
|
symbolSize: 4, //标记的大小
|
|
|
|
symbolSize: 4, //标记的大小
|
|
|
|
@ -1340,7 +1341,7 @@ const lineChartThree = function (data, id, unit = '',smooth=false) {
|
|
|
|
{
|
|
|
|
{
|
|
|
|
name: data.yDataTwoName,
|
|
|
|
name: data.yDataTwoName,
|
|
|
|
type: 'line',
|
|
|
|
type: 'line',
|
|
|
|
smooth:smooth,
|
|
|
|
smooth: smooth,
|
|
|
|
showAllSymbol: true, //显示所有图形。
|
|
|
|
showAllSymbol: true, //显示所有图形。
|
|
|
|
symbol: 'circle', //标记的图形为实心圆
|
|
|
|
symbol: 'circle', //标记的图形为实心圆
|
|
|
|
symbolSize: 4, //标记的大小
|
|
|
|
symbolSize: 4, //标记的大小
|
|
|
|
@ -1528,11 +1529,11 @@ const pieChartTwo = function (data, id, unit = '次') {
|
|
|
|
// color: ["rgb(131,249,103)", "#FBFE27", "#FE5050", "#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
|
|
|
|
// color: ["rgb(131,249,103)", "#FBFE27", "#FE5050", "#1DB7E5"], //'#FBFE27','rgb(11,228,96)','#FE5050'
|
|
|
|
data: data,
|
|
|
|
data: data,
|
|
|
|
roseType: "radius",
|
|
|
|
roseType: "radius",
|
|
|
|
overflow:'break',
|
|
|
|
overflow: 'break',
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
overflow:'break',
|
|
|
|
overflow: 'break',
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
overflow:'break',
|
|
|
|
overflow: 'break',
|
|
|
|
formatter: `{b|{b}} \n {c|{c}${unit}}`,
|
|
|
|
formatter: `{b|{b}} \n {c|{c}${unit}}`,
|
|
|
|
rich: {
|
|
|
|
rich: {
|
|
|
|
c: {
|
|
|
|
c: {
|
|
|
|
@ -1630,7 +1631,7 @@ const verticalBarChart = function (data, id, unit = '次') {
|
|
|
|
series: [
|
|
|
|
series: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
type: "bar",
|
|
|
|
type: "bar",
|
|
|
|
barWidth: data.yData.length<4? 2*vw:'75%',
|
|
|
|
barWidth: data.yData.length < 4 ? 2 * vw : '75%',
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
position: 'top',
|
|
|
|
position: 'top',
|
|
|
|
@ -1672,6 +1673,283 @@ const verticalBarChart = function (data, id, unit = '次') {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 多个垂直柱状图
|
|
|
|
// 多个垂直柱状图
|
|
|
|
|
|
|
|
const multipleVerticalBarChart1 = function (data, id) {
|
|
|
|
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
|
|
|
|
let num1 = data.yDataOne.slice(0,4)
|
|
|
|
|
|
|
|
let num2 = data.yDataTwo.slice(0,4)
|
|
|
|
|
|
|
|
let num3 = data.yDataThree.slice(0,4)
|
|
|
|
|
|
|
|
num1 = num1.map(e => {
|
|
|
|
|
|
|
|
if (e > 14) {
|
|
|
|
|
|
|
|
return 14
|
|
|
|
|
|
|
|
} else if (e < 10) {
|
|
|
|
|
|
|
|
return 10
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return e
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
num2 = num2.map(e => {
|
|
|
|
|
|
|
|
if (e > 14) {
|
|
|
|
|
|
|
|
return 14
|
|
|
|
|
|
|
|
} else if (e < 10) {
|
|
|
|
|
|
|
|
return 10
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return e
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
num3 = num3.map(e => {
|
|
|
|
|
|
|
|
if (e > 14) {
|
|
|
|
|
|
|
|
return 14
|
|
|
|
|
|
|
|
} else if (e < 10) {
|
|
|
|
|
|
|
|
return 10
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
return e
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
|
|
|
|
data = {
|
|
|
|
|
|
|
|
xName: [
|
|
|
|
|
|
|
|
"7:00",
|
|
|
|
|
|
|
|
"8:00",
|
|
|
|
|
|
|
|
"9:00",
|
|
|
|
|
|
|
|
"10:00",
|
|
|
|
|
|
|
|
"11:00",
|
|
|
|
|
|
|
|
"12:00",
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
yDataOne: [4.9, 7.3, 9.2, 5.6, 7.7, 5.6],
|
|
|
|
|
|
|
|
yDataOneName: "制氢",
|
|
|
|
|
|
|
|
yDataTwo: [2.9, 5, 4.4, 2.7, 5.7, 4.6],
|
|
|
|
|
|
|
|
yDataTwoName: "发电",
|
|
|
|
|
|
|
|
yDataThree: [3.9, 6, 5.4, 3.7, 6.7, 5.6],
|
|
|
|
|
|
|
|
yDataThreeName: "充装",
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let option = {
|
|
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
|
|
//提示框组件
|
|
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
|
|
trigger: "axis",
|
|
|
|
|
|
|
|
axisPointer: {
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: "#57617B",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
grid: {
|
|
|
|
|
|
|
|
left: "1%",
|
|
|
|
|
|
|
|
right: "4%",
|
|
|
|
|
|
|
|
bottom: "0",
|
|
|
|
|
|
|
|
top: 30,
|
|
|
|
|
|
|
|
padding: "0 0 10 0",
|
|
|
|
|
|
|
|
containLabel: true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
legend: {
|
|
|
|
|
|
|
|
//图例组件,颜色和名字
|
|
|
|
|
|
|
|
right: 10,
|
|
|
|
|
|
|
|
top: 0,
|
|
|
|
|
|
|
|
itemGap: 16,
|
|
|
|
|
|
|
|
itemWidth: vw,
|
|
|
|
|
|
|
|
itemHeight: 0.6 * vw,
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
dataZoom: [],
|
|
|
|
|
|
|
|
xAxis: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: "category",
|
|
|
|
|
|
|
|
boundaryGap: true, //坐标轴两边留白
|
|
|
|
|
|
|
|
data: ['A1', 'A2', 'A3', 'A4'],
|
|
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
color: '#fff'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
axisTick: {
|
|
|
|
|
|
|
|
//坐标轴刻度相关设置。
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
|
|
//坐标轴轴线相关设置
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: "#fff",
|
|
|
|
|
|
|
|
opacity: 0.2,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
type: 'dashed',
|
|
|
|
|
|
|
|
color: '#777777',
|
|
|
|
|
|
|
|
opacity: 0.3,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
yAxis: {
|
|
|
|
|
|
|
|
type: "value",
|
|
|
|
|
|
|
|
splitNumber: 5,
|
|
|
|
|
|
|
|
min: 10,
|
|
|
|
|
|
|
|
max: 14,
|
|
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
color: '#fff'
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
axisTick: {
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
type: 'dashed',
|
|
|
|
|
|
|
|
color: '#777777',
|
|
|
|
|
|
|
|
opacity: 0.3,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
series: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: data.yDataOneName,
|
|
|
|
|
|
|
|
type: "bar",
|
|
|
|
|
|
|
|
data: data.yDataOne,
|
|
|
|
|
|
|
|
barWidth: 1 * vw,
|
|
|
|
|
|
|
|
barGap: 0, //柱间距离
|
|
|
|
|
|
|
|
label: {
|
|
|
|
|
|
|
|
//图形上的文本标签
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
position: "top",
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
//图形样式
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
barBorderRadius: [5, 5, 0, 0],
|
|
|
|
|
|
|
|
color: {
|
|
|
|
|
|
|
|
x: 0,
|
|
|
|
|
|
|
|
y: 0,
|
|
|
|
|
|
|
|
x2: 0,
|
|
|
|
|
|
|
|
y2: 1,
|
|
|
|
|
|
|
|
type: 'linear',
|
|
|
|
|
|
|
|
global: false,
|
|
|
|
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: 'rgb(21, 148, 244)',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
|
|
color: 'rgb(13, 48, 243)',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: data.yDataTwoName,
|
|
|
|
|
|
|
|
type: "bar",
|
|
|
|
|
|
|
|
data: data.yDataTwo,
|
|
|
|
|
|
|
|
barWidth: 1 * vw,
|
|
|
|
|
|
|
|
barGap: 0.5, //柱间距离
|
|
|
|
|
|
|
|
label: {
|
|
|
|
|
|
|
|
//图形上的文本标签
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
position: "top",
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
//图形样式
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
barBorderRadius: [5, 5, 0, 0],
|
|
|
|
|
|
|
|
color: {
|
|
|
|
|
|
|
|
x: 0,
|
|
|
|
|
|
|
|
y: 0,
|
|
|
|
|
|
|
|
x2: 0,
|
|
|
|
|
|
|
|
y2: 1,
|
|
|
|
|
|
|
|
type: 'linear',
|
|
|
|
|
|
|
|
global: false,
|
|
|
|
|
|
|
|
colorStops: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: '#0DCEB1',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 1,
|
|
|
|
|
|
|
|
color: '#14A15A',
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: data.yDataThreeName,
|
|
|
|
|
|
|
|
type: "bar",
|
|
|
|
|
|
|
|
data: data.yDataThree,
|
|
|
|
|
|
|
|
barWidth: 1 * vw,
|
|
|
|
|
|
|
|
barGap: 0.5, //柱间距离
|
|
|
|
|
|
|
|
label: {
|
|
|
|
|
|
|
|
//图形上的文本标签
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
position: "top",
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
//图形样式
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
barBorderRadius: [5, 5, 0, 0],
|
|
|
|
|
|
|
|
color: "rgba(26, 99, 74, 0.7)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (data?.xName?.length >= 4) {
|
|
|
|
|
|
|
|
option.dataZoom.push({
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
type: 'slider',
|
|
|
|
|
|
|
|
bottom: '0%',
|
|
|
|
|
|
|
|
xAxisIndex: 0,
|
|
|
|
|
|
|
|
height: 12,
|
|
|
|
|
|
|
|
start: 0,
|
|
|
|
|
|
|
|
end: 1 / (data.xName.length / 4) * 100,
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
fontSize: 0,
|
|
|
|
|
|
|
|
color: 'rgba(0,0,0,0)'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
option.grid.bottom = '7%'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
charts.setOption(option);
|
|
|
|
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
|
|
|
|
}
|
|
|
|
const multipleVerticalBarChart = function (data, id) {
|
|
|
|
const multipleVerticalBarChart = function (data, id) {
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
|
@ -1932,7 +2210,7 @@ const multipleVerticalBarChart = function (data, id) {
|
|
|
|
charts.setOption(option);
|
|
|
|
charts.setOption(option);
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',margin=20,isColor=true) {
|
|
|
|
const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '', margin = 20, isColor = true) {
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
let charts = echarts.init(id);
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
|
data = {
|
|
|
|
data = {
|
|
|
|
@ -1947,7 +2225,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
|
|
|
|
grid: {
|
|
|
|
grid: {
|
|
|
|
top: "20%",
|
|
|
|
top: "20%",
|
|
|
|
left: "1%",
|
|
|
|
left: "1%",
|
|
|
|
right: "1%",
|
|
|
|
right: "5%",
|
|
|
|
bottom: "1%",
|
|
|
|
bottom: "1%",
|
|
|
|
containLabel: true,
|
|
|
|
containLabel: true,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -1958,7 +2236,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
legend: {
|
|
|
|
legend: {
|
|
|
|
right:'0',
|
|
|
|
right: '0',
|
|
|
|
data: [data.yDataOneName, data.yDataTwoName],
|
|
|
|
data: [data.yDataOneName, data.yDataTwoName],
|
|
|
|
textStyle: {
|
|
|
|
textStyle: {
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
@ -2005,10 +2283,11 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
|
|
|
|
focus: 'series'
|
|
|
|
focus: 'series'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
barWidth: '30%',
|
|
|
|
barWidth: '30%',
|
|
|
|
|
|
|
|
barMaxWidth: '50px',
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
//图形样式
|
|
|
|
//图形样式
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: isColor? '#db8151': "#64BCEC",
|
|
|
|
color: isColor ? '#db8151' : "#64BCEC",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
@ -2029,6 +2308,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
|
|
|
|
focus: 'series'
|
|
|
|
focus: 'series'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
barWidth: '30%',
|
|
|
|
barWidth: '30%',
|
|
|
|
|
|
|
|
barMaxWidth: '50px',
|
|
|
|
barGap: '40%',
|
|
|
|
barGap: '40%',
|
|
|
|
label: {
|
|
|
|
label: {
|
|
|
|
show: true,
|
|
|
|
show: true,
|
|
|
|
@ -2042,7 +2322,7 @@ const multipleVerticalBarChartTwo = function (data, id, rotate = 0, unit = '',ma
|
|
|
|
itemStyle: {
|
|
|
|
itemStyle: {
|
|
|
|
//图形样式
|
|
|
|
//图形样式
|
|
|
|
normal: {
|
|
|
|
normal: {
|
|
|
|
color: isColor? '#9ce375': "#4FD3B9",
|
|
|
|
color: isColor ? '#9ce375' : "#4FD3B9",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
data: data.yDataTwo
|
|
|
|
data: data.yDataTwo
|
|
|
|
@ -2614,6 +2894,273 @@ const singleVerticalBarChartTwo = function (data, id) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 多个折线面积图(直线)
|
|
|
|
// 多个折线面积图(直线)
|
|
|
|
|
|
|
|
const multipleBrokenLineAreaDiagram1 = (data, ids) => {
|
|
|
|
|
|
|
|
let charts = echarts.init(ids);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function Fun() {
|
|
|
|
|
|
|
|
this.randomNum = function () {
|
|
|
|
|
|
|
|
let arr = []
|
|
|
|
|
|
|
|
for (let i = 0; i < 12; i++) {
|
|
|
|
|
|
|
|
arr.push(parseInt(Math.random() * 100))
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return arr
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
|
|
|
|
data = {
|
|
|
|
|
|
|
|
xData: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'],
|
|
|
|
|
|
|
|
yDataOne: new Fun().randomNum(),
|
|
|
|
|
|
|
|
yDataTwo: new Fun().randomNum(),
|
|
|
|
|
|
|
|
yDataOneName: '制氢量',
|
|
|
|
|
|
|
|
yDataTwoName: '发电量',
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
let max = 24
|
|
|
|
|
|
|
|
let min = 18
|
|
|
|
|
|
|
|
// let max = Math.round(Math.max(...data.yDataOne, ...data.yDataTwo))
|
|
|
|
|
|
|
|
// let min = Math.round(Math.min(...data.yDataOne, ...data.yDataTwo))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let option = {
|
|
|
|
|
|
|
|
tooltip: {
|
|
|
|
|
|
|
|
trigger: "axis",
|
|
|
|
|
|
|
|
axisPointer: {
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: "#57617B",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
legend: {
|
|
|
|
|
|
|
|
icon: "rect",
|
|
|
|
|
|
|
|
itemWidth: 0.75 * vw,
|
|
|
|
|
|
|
|
itemHeight: 0.25 * vw,
|
|
|
|
|
|
|
|
itemGap: 0.75 * vw,
|
|
|
|
|
|
|
|
data: [data.yDataOneName, data.yDataTwoName, data.yDataThreeName],
|
|
|
|
|
|
|
|
right: "4%",
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
color: "#F1F1F3",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
grid: {
|
|
|
|
|
|
|
|
top: "20%",
|
|
|
|
|
|
|
|
left: "3%",
|
|
|
|
|
|
|
|
right: "4%",
|
|
|
|
|
|
|
|
bottom: "3%",
|
|
|
|
|
|
|
|
containLabel: true,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
dataZoom: [],
|
|
|
|
|
|
|
|
xAxis: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
type: "category",
|
|
|
|
|
|
|
|
boundaryGap: false,
|
|
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: "#57617B",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
color: '#fff',
|
|
|
|
|
|
|
|
interval: 0,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data: data.xData,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
yAxis: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
type: "value",
|
|
|
|
|
|
|
|
axisTick: {
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
max: 24,
|
|
|
|
|
|
|
|
min: 18,
|
|
|
|
|
|
|
|
axisLine: {
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: "#57617B",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
axisLabel: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
color: '#fff',
|
|
|
|
|
|
|
|
interval: 0.5,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
splitLine: {
|
|
|
|
|
|
|
|
show: false,
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
color: "#57617B",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
series: [
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: data.yDataOneName,
|
|
|
|
|
|
|
|
type: "line",
|
|
|
|
|
|
|
|
smooth: false,
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
width: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
areaStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: new echarts.graphic.LinearGradient(
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
1,
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: "rgba(137, 189, 27, 0.6)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0.8,
|
|
|
|
|
|
|
|
color: "rgba(137, 189, 27, 0.2)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
shadowColor: "rgba(0, 0, 0, 0.1)",
|
|
|
|
|
|
|
|
shadowBlur: 10,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: "rgb(137,189,27)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
label: {
|
|
|
|
|
|
|
|
//图形上的文本标签
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
position: "top",
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data: data.yDataOne,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: data.yDataTwoName,
|
|
|
|
|
|
|
|
type: "line",
|
|
|
|
|
|
|
|
smooth: false,
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
width: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
areaStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: new echarts.graphic.LinearGradient(
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
1,
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: "rgba(0, 136, 212, 0.6)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0.8,
|
|
|
|
|
|
|
|
color: "rgba(0, 136, 212, 0.2)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
shadowColor: "rgba(0, 0, 0, 0.1)",
|
|
|
|
|
|
|
|
shadowBlur: 10,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: "rgb(0,136,212)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
label: {
|
|
|
|
|
|
|
|
//图形上的文本标签
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
position: "bottom",
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
color: "#a8aab0",
|
|
|
|
|
|
|
|
fontStyle: "normal",
|
|
|
|
|
|
|
|
fontFamily: "微软雅黑",
|
|
|
|
|
|
|
|
fontSize: 0.75 * vw,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data: data.yDataTwo,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
name: data.yDataThreeName,
|
|
|
|
|
|
|
|
type: "line",
|
|
|
|
|
|
|
|
smooth: false,
|
|
|
|
|
|
|
|
lineStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
width: 1,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
areaStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: new echarts.graphic.LinearGradient(
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
0,
|
|
|
|
|
|
|
|
1,
|
|
|
|
|
|
|
|
[
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0,
|
|
|
|
|
|
|
|
color: "rgba(219, 50, 51, 0.6)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
offset: 0.8,
|
|
|
|
|
|
|
|
color: "rgba(219, 50, 51, 0.2)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
false
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
shadowColor: "rgba(0, 0, 0, 0.1)",
|
|
|
|
|
|
|
|
shadowBlur: 10,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
itemStyle: {
|
|
|
|
|
|
|
|
normal: {
|
|
|
|
|
|
|
|
color: "rgb(219,50,51)",
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
data: data.yDataThree,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (data?.xData?.length >= 4) {
|
|
|
|
|
|
|
|
option.dataZoom.push({
|
|
|
|
|
|
|
|
show: true,
|
|
|
|
|
|
|
|
type: 'slider',
|
|
|
|
|
|
|
|
bottom: '0%',
|
|
|
|
|
|
|
|
xAxisIndex: 0,
|
|
|
|
|
|
|
|
height: 12,
|
|
|
|
|
|
|
|
start: 0,
|
|
|
|
|
|
|
|
end: 1 / (data.xData.length / 4) * 100,
|
|
|
|
|
|
|
|
textStyle: {
|
|
|
|
|
|
|
|
fontSize: 0,
|
|
|
|
|
|
|
|
color: 'rgba(0,0,0,0)'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
option.grid.bottom = '7%'
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
charts.setOption(option);
|
|
|
|
|
|
|
|
$(window).resize(charts.resize);
|
|
|
|
|
|
|
|
}
|
|
|
|
const multipleBrokenLineAreaDiagram = (data, ids) => {
|
|
|
|
const multipleBrokenLineAreaDiagram = (data, ids) => {
|
|
|
|
let charts = echarts.init(ids);
|
|
|
|
let charts = echarts.init(ids);
|
|
|
|
|
|
|
|
|
|
|
|
|