fix allPrintStatusChart in history
Signed-off-by: Stefan Dej <meteyou@gmail.com>
This commit is contained in:
parent
45f726159b
commit
8e77e84a6e
@ -17,10 +17,10 @@ export default {
|
|||||||
darkMode: true,
|
darkMode: true,
|
||||||
animation: false,
|
animation: false,
|
||||||
grid: {
|
grid: {
|
||||||
top: 0,
|
top: 10,
|
||||||
right: 0,
|
right: 0,
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
left: 0,
|
left: 10,
|
||||||
},
|
},
|
||||||
tooltip: {
|
tooltip: {
|
||||||
trigger: 'item'
|
trigger: 'item'
|
||||||
@ -36,9 +36,7 @@ export default {
|
|||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapState({
|
...mapState({
|
||||||
intervalChartUpdate: state => state.gui.tempchart.intervalChartUpdate,
|
|
||||||
intervalDatasetUpdate: state => state.gui.tempchart.intervalDatasetUpdate,
|
|
||||||
boolTempchart: state => state.gui.dashboard.boolTempchart,
|
|
||||||
}),
|
}),
|
||||||
getAllPrintStatusArray: {
|
getAllPrintStatusArray: {
|
||||||
get: function() {
|
get: function() {
|
||||||
@ -51,7 +49,6 @@ export default {
|
|||||||
if (document.getElementById("historyAllPrintStatus") && this.chart === null) {
|
if (document.getElementById("historyAllPrintStatus") && this.chart === null) {
|
||||||
this.chart = echarts.init(document.getElementById("historyAllPrintStatus"), null, { renderer: 'svg' })
|
this.chart = echarts.init(document.getElementById("historyAllPrintStatus"), null, { renderer: 'svg' })
|
||||||
this.updateChart()
|
this.updateChart()
|
||||||
window.console.log("create AllPrintStatus")
|
|
||||||
} else
|
} else
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.createChart()
|
this.createChart()
|
||||||
@ -60,10 +57,9 @@ export default {
|
|||||||
updateChart() {
|
updateChart() {
|
||||||
if (this.chart) {
|
if (this.chart) {
|
||||||
const chartOptions = { series: this.chartOptions.series }
|
const chartOptions = { series: this.chartOptions.series }
|
||||||
chartOptions.series[0].data = this.filamentUsageArray
|
chartOptions.series[0].data = this.getAllPrintStatusArray
|
||||||
this.chart.setOption(chartOptions)
|
this.chart.setOption(chartOptions)
|
||||||
this.chart.resize()
|
this.chart.resize()
|
||||||
window.console.log("update AllPrintStatus")
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user