Sets the value of the labelJsFunction property to the name of the JavaScript function.
●Layout
<verticalAxis>
<LinearAxis id="hAxis" displayName="Amount" labelJsFunction="axisLabelFunc"/>
</verticalAxis>
●Script
Parameters
id: the ID of the axis
value: the axis label of the item
function axisLabelFunc(id, value)
{
var s = insertComma(value);
return "$" + s;
}
This JavaScript function adds the thousand separator to the label
function insertComma(n) {
var reg = /(^[+-]?\d+)(\d{3})/; // Regular expression
n += "";
while (reg.test(n))
n = n.replace(reg, '$1' + "," + '$2');
return n;
}