使用dojo的dojox.dgauges中的textIndicatorPrecision [英] textIndicatorPrecision in dojox.dgauges using dojo

查看:119
本文介绍了使用dojo的dojox.dgauges中的textIndicatorPrecision的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Dgauges中添加一个精度的属性名称是什么,在dojox.gauges中是textIndicatorPrecision,就像noChange它被interactiveArea替换。

What is the name of the attribute in Dgauges to add a precision, it was textIndicatorPrecision in dojox.gauges, like noChange it's replaced by interactionArea.

我添加了一个指示器到我的圆形测量仪使用dojox.dgauges,但我想添加一个精度。

I added an indicator to my circular gauge using dojox.dgauges but I want to add a precision.

代码:

  var indicatorText = new dojox.dgauges.TextIndicator(); 
  indicatorText.set("indicator",indicator); 
  indicatorText.set("x", 130); 
  indicatorText.set("y", 154); 
  gauge.addElement("indicatorText", indicatorText); 

谢谢。

推荐答案

此物业没有替代品。你必须定义你自己的labelFunc。示例:

There is no replacement for this property. You must define your own labelFunc. Example:

var textIndicator = new TextIndicator();
... 
textIndicator.labelFunc = function(v){
    return v.toFixed(2);
}

这篇关于使用dojo的dojox.dgauges中的textIndicatorPrecision的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆