I'm a d3 noob, so I need some help on creating a circular gauge chart. The chart should switch from red to yellow to green based on certain value.
The problem is that I want to display the text inside the chart as 0 to 100, but now it is 360 to 0. Is this possible?
Also how can I position the value at center point of my inner circle?
I change the value randomly with this code:
var pi = Math.PI; var num = Math.random() * 360; var numPi = Math.floor(num - 360) * -(pi/180);
I've made a simple plunker to show my attempt: http://plnkr.co/edit/CREdBeHKxre2ISNqOD6N?p=preview