Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 302b40bcef | |||
| e89150507c |
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user