Solved! Go to Solution.
Hi,
My GenerateRendererTask generates a renderer and lists the class break in a legend div. The numbers in the class breaks are unformatted. Is there a way to programmatically format these numbers e.g. instead of 8.808848 - 17.767013, I should see 8.81 - 17.77?
I am using Arcgis Server 10.1 with Javascript API.
Thanks
Samir
dojo.number.format(value, {places:2});
have you trieddojo.number.format(value, {places:2});
my guess is just prior to
stateFeatureLayer.setRenderer(renderer);
you will have to evaluate and modify the renderer
from classbreaksrenderer API
var symbols = dojo.map(results[0].layer.renderer.infos,function(info){
return {label: info.label,symbol:info.symbol};
});
seems to indicate that you could override the label with a rounded value