majorTicksColor by interval into dojox gauges using dojo toolkit

你。 提交于 2019-12-04 20:02:53

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();
});

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!