| | |
| | | </template> |
| | | <script> |
| | | import * as echarts from 'echarts'; |
| | | import { smallLineOption } from '@/utils/chart/chart-option'; |
| | | import { smallLineOption, baseVisualMap } from '@/utils/chart/chart-option'; |
| | | |
| | | export default { |
| | | props: { |
| | |
| | | yMinInterval: { |
| | | type: Number, |
| | | default: 1 |
| | | } |
| | | }, |
| | | // 异常数据索引范围集合,[[i1,i2], [i3,i4],...] |
| | | exceptionIndexArr: Array |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | const { xAxis, series } = this.modelValue; |
| | | if (!this.option) { |
| | | this.option = smallLineOption(xAxis, series, this.yMinInterval); |
| | | if (this.exceptionIndexArr) { |
| | | const visualMap = baseVisualMap(this.exceptionIndexArr); |
| | | this.option.visualMap = visualMap; |
| | | } |
| | | } else { |
| | | this.option.xAxis[0].data = xAxis; |
| | | this.option.series = series; |