updated values failed to redraw the correct needle value
See original GitHub issueWhen updating the needle values for the radial gauge component, the watch function will not update the needle value on the first try. It settles at zero a few times before accepting the new value.
<template>
<canvas class="canvas-gauges"></canvas>
</template>
<script>
import { RadialGauge } from 'canvas-gauges'
export default {
props: {
value: Number,
options: {
type: Object,
default: () => ({})
}
},
data: function () {
return {
chart: null
}
},
mounted: function () {
this.chart = new RadialGauge(Object.assign({}, this.options, { renderTo: this.$el, value: this.value }))
.draw()
},
beforeDestroy: function () {
this.chart.destroy()
},
watch: {
value: function (val) {
this.chart.value = val
},
options: function (opt) {
this.chart.destroy()
this.chart = new RadialGauge(Object.assign({}, this.options, {renderTo: this.$el, value: this.value})).draw()
}
}
}
</script>
Issue Analytics
- State:
- Created 5 years ago
- Comments:7
Top Results From Across the Web
Autoreferencing values for needle missing - Agilent Community
The error in we are seeing reads as "Autoreferencing values for needle missing (EE25146.0). Cold restart, reinstalling the needle seat and loop, ...
Read more >How to deal with 'Update was terminated' issue - SAP Blogs
And click the 'Display Update Data' button to verify the value of accordingly table and structure.
Read more >Empty needle error in logs - WordPress.org
hi, it is happening because you have an empty location permalink slug in your settings under Pages > Permalink Slugs. If you add...
Read more >Certified LabVIEW Associate Developer Exam Test Booklet
Which of the following is the best method to update an indicator on the front panel? a. Use a Value property node b....
Read more >COMMON ERRORS IN KRONOS AND HOW TO FIX THEM
Employee Error Details. Entering work hours before they have actually been worked. Employees are not allowed to record their work time until they...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi there ! Same problem here. If I do gauge.update ({value: 100}) then gauge.value = 2000 the needle is not correct (0 unitl I set a new value) …
It looks like an animation problem. If I disable the animation everything works fine.
Any idea ?
@MichaelSprague That fixes the issue for my usecase, let me know if you need help with putting together a pull request.