option = {
color: ["#e57e1f", "#666666", "#4c6291"],//线条颜色
title: {
//text: 'Step Line'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: ["电流", "BMS1", "BMS2"],
orient: "vertical",
x: "left",
y: "center",
icon: "rect",
align: "left",
},
grid: {
left: "15%",
right: "8%",
bottom: "12%",
containLabel: true,
},
toolbox: {
show: false,
feature: {
saveAsImage: {}
}
},
xAxis: {
type: 'category',
boundaryGap: false,
data: times,
splitLine: {
show: true,
},
axisTick: {
show: false,
},
axisLabel: {
rotate: 90,
},
},
yAxis: [
{
scale: true,
type: "value",
name: "单位:A",
axisTick: {
show: false,
},
max: 70,
min: -10,
splitNumber: 9,
},
{
scale: true,
type: "value",
name: "单位:℃",
axisTick: {
show: false,
alignWithLabel: true,
},
max: 50,
min: 10,
splitNumber: 9,
},
],
dataZoom: [ //滚动条
{
show: true,
realtime: true,
start: 0,
end: 100,
},
{
type: "inside",
realtime: true,
tart: 0,
end: 100,
},
],
series: [
{
name: '电流',
type: 'line',
//step: 'start',
symbol: "none",
data: currentCapacity,
yAxisIndex:0,
markLine: {
symbol: ["none", "none"],
lineStyle: {
normal: {
type: "solid",
color: "red",
width:2
},
},
label: {
normal: {
show: true,
formatter: "某一时间",
},
},
itemStyle: {
normal: {
color: "red",
},
},
data: [{ name: "某一时间点", xAxis: faultTime }],
},
},
{
name: 'BMS1',
type: 'line',
//step: 'start',
symbol: "none",
data: bmsTemp1,
yAxisIndex:1
},
{
name: 'BMS2',
type: 'line',
//step: 'start',
symbol: "none",
data: bmsTemp2,
yAxisIndex:1
},
]
};