Compare commits

...

2 Commits

Author SHA1 Message Date
nthu1080112244 302b40bcef [debug] fix cycleIV.js and chartAct.js 2022-07-25 10:12:26 +08:00
nthu1080112244 e89150507c [debug] fix missing mapActions in CanvasChart.vue 2022-07-22 14:59:01 +08:00
4 changed files with 11 additions and 13 deletions
@@ -112,8 +112,9 @@ import CanvasChartFilterPopup from './CanvasChartFilterPopup.vue'
import CanvasChartSource from './CanvasChartSource'
import { taskInfo } from '../../../../data/task/TaskInfo'
import { mapFields } from 'vuex-map-fields'
import paramTable from '@/data/param-table/index.js'
import CanvasChartRealTimeDisplay from '@/components/task/content/chart/CanvasChartRealTimeDisplay'
import { mapActions } from 'vuex'
import taskTypes from '@/store/modules/task/content/types'
export default {
name: 'CanvasChart',
@@ -167,13 +168,6 @@ export default {
threeAxisIntervalInput: 'auto',
xIntervalInput: 'auto',
yIntervalInput: 'auto',
// test data
paramTable: paramTable,
realTime: [[]],
btn1: false,
btn2: false,
btn3: false,
temp: null,
}
},
methods: {
@@ -335,6 +329,9 @@ export default {
type: 'legendInverseSelect',
})
},
...mapActions('taskContent', [
taskTypes.chart.saveToCache,
]),
},
async mounted () {
this.data = this.chartData[this.chartID]
@@ -87,8 +87,8 @@ export default {
// the device is active now --> update the real time value
if (this.data.series[this.realTime[gridIndex][channelIndex].seriesSource] !== undefined && this.data.series[this.realTime[gridIndex][channelIndex].seriesSource].data !== undefined && this.data.series[this.realTime[gridIndex][channelIndex].seriesSource].data.length > 0) {
this.realTime[gridIndex][channelIndex].xValue = this.data.series[this.realTime[gridIndex][channelIndex].seriesSource].data.at(-1)[0] / this.realTime[gridIndex][channelIndex].xValueScale[this.realTime[gridIndex][channelIndex].xUnit]
this.realTime[gridIndex][channelIndex].yValue = this.data.series[this.realTime[gridIndex][channelIndex].seriesSource].data.at(-1)[1] / this.realTime[gridIndex][channelIndex].yValueScale[this.realTime[gridIndex][channelIndex].yUnit]
this.realTime[gridIndex][channelIndex].xValue = (this.data.series[this.realTime[gridIndex][channelIndex].seriesSource].data.at(-1)[0] / this.realTime[gridIndex][channelIndex].xValueScale[this.realTime[gridIndex][channelIndex].xUnit]).toFixed(3)
this.realTime[gridIndex][channelIndex].yValue = (this.data.series[this.realTime[gridIndex][channelIndex].seriesSource].data.at(-1)[1] / this.realTime[gridIndex][channelIndex].yValueScale[this.realTime[gridIndex][channelIndex].yUnit]).toFixed(3)
}
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ export default {
minute: 60 * 1e6,
hour: 60 * 60 * 1e6,
},
defaultUnit: 's',
defaultUnit: 'ms',
downloadUnit: 'ms',
},
0: {
@@ -1194,6 +1194,7 @@ function makeYAxis (gridIndex, type, channel) {
// // // verticalAlign: 'bottom',
// // },
gridIndex: gridIndex,
boundarygap: ['0%', '50%'],
axisTick: { show: false },
axisLine: { show: false }, // color: '#ccc' } },
axisLabel: {
@@ -1209,8 +1210,8 @@ function makeYAxis (gridIndex, type, channel) {
// // },
animation: false,
scale: true,
min: 'dataMin',
max: 'dataMax',
// min: 'dataMin',
// max: 'dataMax',
splitNumber: 3,
// minInterval: 1,
interval: null,