0👍
The userCallback
runs for each tick. In your code you return a value, when any value’s country_name in $scope.selects
matches ‘Eire’ or ‘UK’.. Is that what you want?
I dont know enough about your data, but if the country_name
is dependant on the dataset and not each data point, you could create a currency prefix variable outside of the userCallback and add it onto the tick values:
// Load dataset
// set currency prefix based on the data
...
userCallback: function (value, index, values) {
if (KpiName === "sales_growth_ytd")
{
return value + '%';
}
else {
return currency_prefix + value;
}
}
- Chartjs-Why is there an error in ChartJs.Blazor (change in ASPNETCORE_ENVIRONMENT)
- Chartjs-Add space between point of the chart and of the border chart in react-chartjs-2
Source:stackexchange.com