Posting it 3 times really makes it urgent. 🙂After the call to generateRenderer completes, you get the renderer and you can manipulate it before applying it to the layer. Here is a code snippet. It's probably more than you asked. You can ignore minValue and maxValue for your case.Hope this helps.
function _processRenderer(renderer, prefix, unitLabel, formatLabel, precision, minValue, maxValue){
if (renderer.declaredClass === "esri.renderer.ClassBreaksRenderer") {
array.forEach(renderer.infos, function (item, idx) {
if (idx === 0 && minValue !== undefined && minValue !== null) {
item.minValue = minValue;
}
if (idx === renderer.infos.length - 1 && maxValue !== undefined && maxValue !== null) {
item.classMaxValue = item.maxValue = maxValue;
}
if (precision) {
item.classMaxValue = item.maxValue = Math.round(item.maxValue / precision) * precision;
item.minValue = Math.round(item.minValue / precision) * precision;
}
if (formatLabel) {
item.label = number.format(item.minValue) + " - " + number.format(item.maxValue);
}
if (prefix) {
item.label = prefix + " " + item.label;
}
if (unitLabel) {
item.label = item.label + " " + unitLabel;
}
});
}
else {
array.forEach(renderer.infos, function (item, idx) {
if (idx === 0 && minValue !== undefined && minValue !== null) {
item.value = minValue;
}
if (idx === renderer.infos.length - 1 && maxValue !== undefined && maxValue !== null) {
item.value = maxValue;
}
if (formatLabel) {
item.label = number.format(item.value);
}
if (prefix) {
item.label = prefix + " " + item.label;
}
if (unitLabel) {
item.label = item.label + " " + unitLabel;
}
});
}
return renderer;
}