bernii / gauge.js

100% native and cool looking JavaScript gauge
MIT License
1.42k stars 391 forks source link

Instructions for displaying value alongside gauge? #19

Closed sodevious closed 11 years ago

sodevious commented 11 years ago

I'd like to display the value of the gauge alongside the canvas, as in your preview. Are there instructions for this?

BFTrick commented 11 years ago

I didn't find any instructions but looking through the source code you can create an empty element and then when you're creating the gauge you just have to tell the gauge.js script which element to update.

gauge.setTextField(document.getElementById("preview-textfield"));
BFTrick commented 11 years ago

I just created a wiki page so that we stop pestering @bernii with questions and he can keep writing awesome code!

bernii commented 11 years ago

Big thanks @BFTrick !