Commit b935d842 authored by 陈龙's avatar 陈龙

fix: 剔除isVertical参数;修复x轴错误的问题

parent 206b3f82
......@@ -7,7 +7,7 @@
import { request } from '@wisdom-utils/utils';
import * as constants from '../constants';
const BASEURL = '/PandaAssets/Assets/ReportManager';
const BASEURL = '/PandaAssets/CityWater/ReportManager';
export const API = {
GET_REPORT_INFO: `${BASEURL}/GetReportInfo`, // 获取报表信息
GET_REPORT_FILTER_VALUE: `${BASEURL}/GetReportFilterValue`, // 获取过滤字段的值的枚举
......
......@@ -438,8 +438,9 @@ const HistoryView = (props) => {
if (key === 'chartType') {
data[_index1].showInCurve = e.target.value;
data[_index1].checked = false;
data[_index].showInCurve = false;
data[_index].checked = false;
}
debugger
setCheckboxData(data);
};
......@@ -686,7 +687,7 @@ const HistoryView = (props) => {
zoom,
unit,
ignoreOutliers,
isVertical: false, // 是否查询竖表
// isVertical: false, // 是否查询竖表
dateFrom: item.dateFrom,
dateTo: item.dateTo,
acrossTables,
......
......@@ -348,7 +348,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
markArea,
};
});
console.log('series: ', series);
// 由于series更新后,没有的数据曲线仍然停留在图表区上,导致图表可视区范围有问题
const min = Math.min(
...series.map((item) => item.data?.[0]?.[0]).filter((item) => item !== undefined),
......@@ -360,7 +360,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
);
let xAxis = {type: 'time', min, max};
decorateAxisGridLine(xAxis, showGridLine);
console.log('series: ', series);
const tooltipTimeFormat = !contrast
? 'YYYY-MM-DD HH:mm:ss'
: contrastOption === 'day'
......@@ -380,8 +380,9 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
const {firstPV, lastPV, maxPV, minPV} = item;
return [firstPV, lastPV, minPV, maxPV]
}) || []; //当存在othersData的时候,只是单曲线
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD'))};
series = series.map(item => {
let _item = {...item, symbol: false};
let _item = {...item, symbol: null};
_item.data = _item?.data?.map(d => {
return d[1] || null
}) || [];
......@@ -390,7 +391,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
series.push({
type: 'candlestick',
name: '箱线图',
symbol: false,
symbol: null,
data: otherData
});
} else {
......@@ -401,6 +402,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
_maxData.push(maxPV);
_minData.push(minPV);
}); //当存在othersData的时候,只是单曲线
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD'))};
series = series.map(item => {
let _item = {...item, symbol: false};
_item.data = _item?.data?.map(d => {
......@@ -426,12 +428,7 @@ const optionGenerator = (dataSource, cusOption, contrast, contrastOption, smooth
});
})
}
xAxis = {type: 'category', data: series[0].data.map(item => moment(item[0]).format('YYYY-MM-DD'))};
tooltip.formatter = (e) => {
console.log(e);
}
}
debugger
return {
yAxis,
grid,
......
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