naikus / svg-gauge

Minimalistic, animated SVG gauge. Zero dependencies
MIT License
319 stars 74 forks source link

Use in a vue component? #42

Closed martynwheeler closed 2 years ago

martynwheeler commented 4 years ago

Hi,

Is it possible to use this in a vue component (vue-svg-gauge has some bugs that make it unusable for me)?

Thanks MArtyn

naikus commented 4 years ago

I'm not well versed with Vue but I think it should be possible using the lificycle hooks. https://vuejs.org/v2/api/#Options-Lifecycle-Hooks

martynwheeler commented 4 years ago

@naikus, thanks for your response. I have managed to use it in a vue component. One last question, if I may, is it possible to have a gradient fill for the gauge value that is displayed?

naikus commented 4 years ago

@martynwheeler It may be possible to do it via style attribute or css class using fill property. But changing it dynamically would be a bit of a task

alextbfdigital commented 4 years ago

@naikus, thanks for your response. I have managed to use it in a vue component. One last question, if I may, is it possible to have a gradient fill for the gauge value that is displayed?

Can you tell me how did you use in vue.js? Can you give me an example?

digitalmouse commented 2 years ago

@naikus, thanks for your response. I have managed to use it in a vue component. One last question, if I may, is it possible to have a gradient fill for the gauge value that is displayed?

Can you tell me how did you use in vue.js? Can you give me an example?

Agreed! Share the love! :)

martynwheeler commented 2 years ago

Hey, sorry but I switched to High charts in my app as it was more flexible. Can't remember what I did now...