问题
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.
I added an indicator to my circular gauge using dojox.dgauges but I want to add a precision.
Code :
var indicatorText = new dojox.dgauges.TextIndicator();
indicatorText.set("indicator",indicator);
indicatorText.set("x", 130);
indicatorText.set("y", 154);
gauge.addElement("indicatorText", indicatorText);
Thank you.
回答1:
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);
}
来源:https://stackoverflow.com/questions/15791408/textindicatorprecision-in-dojox-dgauges-using-dojo