score:6
Accepted answer
If you want to add %
after the values of the Y-Axis you can do it using scales in your chart configuration. Your code will look like this:
var myBarChart = new Chart($("#myCanvas"), {
type: 'bar',
data: data,
maintainAspectRatio: false,
options: {
scales: {
yAxes: [{
ticks: {
// Create scientific notation labels
callback: function(value, index, values) {
return value + ' %';
}
}
}]
}
}
});
Fiddle updated with the %
: Fiddle
And if you want to modify the text displayed in the tooltips you can easily change it using callback. You can find more information here Tooltip Callbacks
Source: stackoverflow.com
Related Query
- Format Bar Chart's yAxis labels in Chart.js
- Chart.js - Draw bar chart with multiple labels
- Chartjs - data format for bar chart with multi-level x-axes
- chart js data-point between bar charts
- Display labels on bar chart using Chart.js
- Chart.js: How to get x-axis labels to show on top of bars in bar chart
- Angular-chartjs Data labels over bar chart
- Click on interactive chart.js bar chart and get value for labels and groups in JS
- Labels (category type) on left and right of bar chart using chart.js?
- Add Labels to Chart.js Bar Chart
- Chart Js , repeated labels yAxis
- Chart, X and Y-Axis labels are blurred in horizontal bar chart using chart.js
- How to show the chartjs bar chart data values labels as text?
- ChartJS/High Charts Radar chart - Different radial axis labels for each category that appear on hover
- how can i show labels and value in both on bar chart
- How to add labels on top of the chart bar with Chart.js 2
- Angular-Charts bar chart does not update when I change the data, series, labels
- Modifying the X-Axis Labels of a Bar chart in Chart.js 2
- ng2 charts bar chart need spacing between 2 bars in series Angular
- Chart.js how to display multiple labels on multi bar stacked chart
- Is there any way to change the font size of labels in bar chart in Chart.js v3?
- how to write labels along with data on top and bottom of each stack in bar chart
- Chart.js how to show line chart without displaying the labels on xaxis and yaxis
- How to show bar chart labels clearly using ChartJS?
- Show the latest labels in a bar chart with React.js using react-chartjs
- Chart.js bar chart labels do not valign
- Bar chart with two sets of labels in Quickchart
- Chartjs Bar Chart add background color to value labels
- Bar chart labels in Chart.JS
- Pie Chart using chart.js not showing up but bar charts are?
More Query from same tag
- How to configure chart.js line chart with very low minimum height, and only 0 and 1 (no decimals) as ticks on the y-axis
- Why aren't my data points getting placed in the corresponding locations in my chart?
- Second yAxes values not charting correctly with Chart.js
- Chart bundle js is not showing dynamic data
- In chart.js, how to know if a yAxes tick is bumping/rendering over/into another
- Multiple canvas, reusable gradients
- Second tab doesn't show the chart . Can anybody see why?
- Is it possible to add more attributes to segement in a Doughnut chart of Chart JS?
- Chart.js Doughnut Chart Sizing
- Charts Area JS v2: How to set units?
- Plotting Dashed Vertical and Horizontal lines on line graph for single point
- Is it possible to show labels for all lines?
- How can I delete an instance of a chart using chart.js
- How to Find the Sum of items Per Year Using Chart Js
- create different labels for different data chart js
- Uncaught TypeError: Cannot read property 'draw' of undefined
- Chart.js - Line charts: draw points between grid lines
- How to set a time scale to a ChartJS chart from JSON?
- Dynamic id with canvas on html and angular
- Chartjs time in Xaxes
- Using Chart.js with Gatsby markdown
- The dataset for bar graph is not set properly using ng2 charts and ng5-slider in Angular
- How to Add X axis Padding in chart js Line Graph
- show name on yaxis in chart.js
- Chart.js Change color of the values *inside* the bars of a Bar chart
- donut chart tooltip under center text
- Creating and Updating Graph in HTML and Javascript
- Format Bar Chart's yAxis labels in Chart.js
- chartjs - how to set the order in which the different charts are displayed
- How could I put a string for the points on the x-axis?