Commit 5c7320b8 authored by 陈龙's avatar 陈龙

feat: 优化历史曲线显示

parent bc1f77da
......@@ -11,7 +11,7 @@ const deviceParams = [
deviceType: '熊猫二供泵房',
pointAddressID: 208,
}, */
/* {
/* {
"deviceCode": "SYJ00000008",
"sensors": "瞬时流量",
"deviceType": "水源井"
......@@ -41,12 +41,12 @@ const deviceParams = [
deviceType: '熊猫压力表',
pointAddressID: 4,
},*/
{
/* {
deviceCode: 'EGJZ00000226',
sensors: '出水压力',
deviceType: '二供机组',
pointAddressID: 4,
},
}, */
/* {
"deviceCode": "LLJ00000055",
"sensors": "正累计流量,瞬时流量",
......@@ -58,12 +58,12 @@ const deviceParams = [
"deviceType": "二供机组"
}*/
// 邳州张楼水厂
{
/* {
"deviceCode": "SC00000023",
"sensors": "瞬时流量",
"deviceType": "水厂"
},
/* {
}, */
{
"deviceCode": "JFJ00000001",
"sensors": "沉淀池投矾量瞬时,",
"deviceType": "加矾间"
......@@ -88,12 +88,11 @@ const deviceParams = [
"sensors": "瞬时流量",
"deviceType": "流量计"
},
/!*邳州*!/
{
deviceCode: 'EGJZ00000027',
sensors: '2#变频器运行频率',
deviceType: '二供机组',
},*/
},
/*确山*/
/*泵3状态*/
/* {
......@@ -102,6 +101,11 @@ const deviceParams = [
// sensors: '3#频率',
sensors: '出1累计流量',
deviceType: '二供机组',
}, */
/* {
"deviceCode": "EGBF00000006",
"sensors": "出1累计流量",
"deviceType": "二供泵房"
} */
];
const Demo = () => {
......
......@@ -635,8 +635,8 @@ const handleDefault = (config, cusOption) => {
};
const handleMaxValue = (value) => {
if (value <= 1) return value.toFixed(2);
if (value >= 10000) return `${(value / 1000).toFixed(1)}k`;
return value.toFixed(1);
if (value >= 100000) return `${(value / 1000).toFixed(2)}k`;
return value.toFixed(2);
}
const handleYAxis = ({ dataSource, needUnit, curveCenter, showGridLine }) => {
// 一种指标一个y轴
......@@ -789,7 +789,7 @@ const handleGrid = (dataSource, needUnit, leftNum, rightNum, chartType) => {
return {
top: _base + _topForUnit,
// left: leftNum === 1 ? 10 : leftNum * AXIS_WIDTH,
left: 10,
left: 20,
right:10,
// right: rightNum === 0 ? 20 : rightNum * AXIS_WIDTH,
bottom: 60,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment