Gauge chart using D3

Amey picture Amey · Feb 21, 2014 · Viewed 15.3k times · Source

I've been trying to build a gauge using d3 and ive managed to hack up something that meets the visual requirements http://bl.ocks.org/ameyms/9140907

This is however a very very hacky solution since ive positioned the needle by trial and error and the whole thing breaks if height and width are assigned percentage values. So how do I position it?

Also, how I can make the needle rotate?

Any ideas?

Answer

Amey picture Amey · Dec 5, 2014

For anyone coming here looking for answers, I have created a demo of gauge using D3 here