score: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;
}
}
Source: stackoverflow.com
Related Query
- Chart.js different y axis depending on graph from select options
- How to start the line graph from the left Y axis in a line/bar mixed chart (Chart.js)?
- Chart js different background for y axis
- How to use 'time' (data from database, data type: timestamp ) for plotting graph in Chart JS
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- I am using chartjs node canvas to render a chart however the graph options are being ignored
- How to Remove axis Lines from chart in chart js
- How to stop axis label from being cut off in chart JS?
- ChartJS/High Charts Radar chart - Different radial axis labels for each category that appear on hover
- ChartJS line chart or bar graph from a Java program
- How can I display desired/particular chart in App.vue from Charts.vue which contains different charts in Vuejs
- How to remove the extra Y axis from a bar chart in chart.js
- How to stop displaying the data values from different data objects on Chart JS 2.x?
- Chart JS tick options not working for y axis
- How do i have a single Chart.vue component instead of different chart components and then display charts from it by changing id of the API
- How to start Y Axis Line at 0 from right for negative values in chart js 2?
- How to Add X axis Padding in chart js Line Graph
- getting additional value fields from data source for dx.chartjs doughnut chart
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
- How do I stop chart js from auto rescaling the y axis upon calling chart.update()?
- Multiple axis line chart with Chart.js and JSON data from Google Sheet
- Chart.js move start position of chart from axis
- ChartJS set color of Line chart points depending on Y Axis
- How to clear a chart from a canvas so that hover events cannot be triggered?
- In Chart.js set chart title, name of x axis and y axis?
- Chartjs random colors for each part of pie chart with data dynamically from database
- ChartJS New Lines '\n' in X axis Labels or Displaying More Information Around Chart or Tooltip with ChartJS V2
- How to prevent first/last bars from being cut off in a chart with time scale
- Chart.js Bar Chart - how to chart bars from 0
- Chart Js change text label orientation on Ox axis
More Query from same tag
- chart.js - Horizontal lines per bar
- How to change the time format displayed in the chart?
- ng2-charts - Angular 4 working example
- How can I customize p:polarAreaChart tooltips?
- How to dynamically set backgroundColor and borderColor barchart unsing Chart.js
- Angular Chart.js, how to remove series?
- Trying to insert another label for a piechart in ChartsJS
- Canvas displays initially in Chrome but not in Firefox
- Rotate left legend chartjs
- How to change bar width individually in chartjs?
- Draw a line around a single point in the linechart
- What is the correct format for time data in chartjs?
- multiple horizontal bar charts to display in same row
- Chart.js Bar Chart - grouping and mapping data
- Chart.js - Responsiveness not correctly working on device orientation change
- Populating a chartJS with data from API through axios (VueJS)
- JavaScript & HTML - reusing data from fetch()
- issue with customisation of Chart new.js for bar chart
- How to show text as a series on a chart in Javascript?
- Adding color dynamically to Chart.js
- Chartjs Graph is not showing in colorbox
- Undefined values when try to Insert array in component
- Non-static values for chart using CanvasJS?
- Charts are overlapping with old values on mouse hover
- How to create a multiline graph with differents labels
- dynamically add canvas for chart.js
- Stepped line with null values in chart.js
- Chart.js lost its colors
- chartjs-plugin-annotation box in Django app
- Chart.js - how to disable everything on hover