Option={
XAxis: [{
Type: 'time',
SplitNumber: 13,
BoundaryGap: false,
//the interval: 2 * 3600 * 1000,
AxisLine: {
Show: false,
Color: 'RGB (141, 149, 160)
},
SplitLine: {
Graphics.linestyle: {
Type: 'dotted'
}
},
AxisLabel: {
//verticalAlign: 'bottom',
ShowMaxLabel: true,
ShowMinLabel: false,
Align: 'right',
VerticalAlign: 'top',
Padding: 4,
The formatter: function (the value index) {
Var date=new date (value);
//let y=date. GetFullYear (),
//m=date getMonth () + 1 & lt; 10? '0' + (date, getMonth () + 1) : date, getMonth () + 1,
//d=date. GetDate () & lt; 10? '0' + date. GetDate () : the date. The getDate ();
The return date, getMonth () + 1 + 'month';
},
Color: 'RGB (141, 149, 160)
//the align: 'left'
}
}
],
YAxis: [{
Type: 'value',
Min: 80,
Max: 200,
Position: 'right',
AxisLine: {
OnZero: false,
Graphics.linestyle: {
Color: 'RGB (141, 149, 160)
}
},
AxisLabel: {
//inside: true
}
},
{
Type: 'value',
Min: 80,
Max: 200,
AxisTick: {
Show: false
},
AxisLine: {
OnZero: false,
Graphics.linestyle: {
Color: 'RGB (141, 149, 160)
}
},
AxisLabel: {
Show: false
},
SplitLine: {
Show: false
}
}
],
Series: [{
Name: 'systolic blood pressure,
Type: 'the line',
Smooth: false,
Animation: false,
Data: [{
Value: [' 2020-01-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-02-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-03-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 02:00:00 2020-04-04 ', '11', 'mm hg]
}, {
Value: [' 2020-05-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-06-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-07-01 00:00:00 ', '12', 'mm hg]
}, {
Value: [' 2020-08-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-09-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-10-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-11-01 00:00:00 ', ' ', 'mm hg]
}, {
Value: [' 2020-12-01 00:00:00 ', ' ', 'mm hg]
},
ConnectNulls: true
},
DataZoom: [{
Type: 'inside',
YAxisIndex: 0,
StartValue: 80,
EndValue: 150,
FilterMode: 'none',
ShowDetail: false,
ZoomLock: false,//control can only translation, can't zoom
PreventDefaultMouseMove: false,
ZoomOnMouseWheel: false
},
The grid: {
Top: '70',
Bottom: '30',
Left: '5%'
}
};
Was missing in the code above, show in April, it is not clear what reason, hope someone help me solve
CodePudding user response:
Isn't it too crowded not displayedCodePudding user response:
The date extracted with category axis displayCodePudding user response: