I'm trying to update the x axis labels in nvd3 based on a value but my x axis axisLable
returns the entire function in the chart and not just the string...how do I do it so that it just return the string?
$scope.options_scn_cst_compare = {
chart: {
type: "multiBarChart",
x: function(d){ return d.x; },
y: function(d){ return d.values; },
xAxis: {
axisLabel: function(d) {
if (yAxistm.tm === 'yr') {
return "Time (Years)";
} else if (yAxistm.tm === 'qtr') {
return "Time (Quarterly)";
} else if (yAxistm.tm === 'mth') {
return "Time (Montly)";
};
}
.....
}