|
|
|
@ -2,7 +2,7 @@
|
|
|
|
|
/*
|
|
|
|
|
* @Author: your name
|
|
|
|
|
* @Date: 2021-10-09 11:38:06
|
|
|
|
|
* @LastEditTime: 2021-11-19 19:48:47
|
|
|
|
|
* @LastEditTime: 2021-11-22 10:11:27
|
|
|
|
|
* @LastEditors: Please set LastEditors
|
|
|
|
|
* @Description: In User Settings Edit
|
|
|
|
|
* @FilePath: /data-show/src/views/Index/barometer/opt.js
|
|
|
|
@ -51,12 +51,12 @@ function createData(ds = []) {
|
|
|
|
|
}
|
|
|
|
|
return arr;
|
|
|
|
|
}
|
|
|
|
|
export default function createOpt(dx = [], ds = []) {
|
|
|
|
|
export default function createOpt(dx = [], ds = [], sTimeType = 20) {
|
|
|
|
|
const data = createData(ds);
|
|
|
|
|
return {
|
|
|
|
|
grid: {
|
|
|
|
|
left: 10,
|
|
|
|
|
right: '1%',
|
|
|
|
|
right: '3%',
|
|
|
|
|
bottom: 10,
|
|
|
|
|
top: 36,
|
|
|
|
|
containLabel: true
|
|
|
|
@ -104,9 +104,8 @@ export default function createOpt(dx = [], ds = []) {
|
|
|
|
|
},
|
|
|
|
|
axisLabel: {
|
|
|
|
|
formatter: (value) => {
|
|
|
|
|
let rex = "00:00:00";
|
|
|
|
|
let str = "";
|
|
|
|
|
if(value.indexOf(rex) === -1) {
|
|
|
|
|
if(sTimeType === 34) {
|
|
|
|
|
str = value.substring(10, 16)
|
|
|
|
|
} else {
|
|
|
|
|
str = value.substring(0, 10)
|
|
|
|
|