I'm trying to use dojo toolkit and exactly this gauge.
In fact, I want a feature to majorTicksColor and minorTicksColor, I want the color depends for the interval, eg : from 0 to 30 green, from 30 to 70 yellow and from 70 red to 100, or maybe it is degraded.
Like this image.
Is that possible ?
Thank you.
Regards,
Something like this fiddle?
The principal here is to use an aspect to enhance the drawRange
method of the dojox/gauges/GlossyCircularGauge
widget.
//
// Use the new "drawGreenYellowRedCurves" as an *after* aspect to the existing "drawRange" function.
//
require(['dojox/gauges/GlossyCircularGauge', 'dojo/aspect', 'drawGreenYellowRedCurves', 'dojo/domReady!'],
function (GlossyCircularGauge, aspect, drawGreenYellowRedCurves) {
var gauge = new GlossyCircularGauge({
background: [255, 255, 255, 0],
title: 'Value',
id: "glossyGauge",
width: 300,
height: 300
}, dojo.byId("CircularGauge"));
aspect.after(gauge, "drawRange", drawGreenYellowRedCurves, true);
gauge.startup();
});