Skip to content

Commit

Permalink
fix gauge values.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt committed Feb 7, 2024
1 parent 5e1a8e4 commit 028e682
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/components/ADempiere/Dashboard/charts/Gauge.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@
along with this program. If not, see <https:www.gnu.org/licenses/>.
-->
<template>
<div :class="className" :style="{height:height,width:width}" />
<div
:class="className"
:style="{height:height,width:width}"
/>
</template>

<script>
Expand All @@ -33,7 +36,12 @@ import { getContextAttributes } from '@/utils/ADempiere/contextUtils/contextAttr
const animationDuration = 2800

export default {
mixins: [resize],
name: 'GaugeChart',

mixins: [
resize
],

props: {
className: {
type: String,
Expand All @@ -56,11 +64,13 @@ export default {
required: true
}
},

data() {
return {
chart: null
}
},

watch: {
chartData: {
deep: true,
Expand All @@ -69,12 +79,14 @@ export default {
}
}
},

mounted() {
this.unsubscribe = this.subscribeChanges()
this.$nextTick(() => {
this.initChart()
})
},

beforeDestroy() {
this.unsubscribe()
if (!this.chart) {
Expand All @@ -83,6 +95,7 @@ export default {
this.chart.dispose()
this.chart = null
},

methods: {
subscribeChanges() {
return this.$store.subscribe((mutation, state) => {
Expand Down

0 comments on commit 028e682

Please sign in to comment.