Show color thresholds in c3.js gauge Show color thresholds in c3.js gauge javascript javascript

Show color thresholds in c3.js gauge


There is no specific option in c3.js Gauge chart to draw thresholds lines and legends, so I thought to use d3.js to add them to chart on rendered event:

onrendered: function() {    drawThresholds(this, thresholdOpts, opts);}

Check this jsfiddle for complete example: https://jsfiddle.net/beaver71/032tcczg/

Output obtained looks like below:

enter image description here

and:

enter image description here