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
- charts js, doughnut chart not rendering tooptips correctly
- How to display currency in Chart js
- How do I remove CSS code arriving in my webpage?
- Cross Browser Support for Chart.js
- Auto-Remove old Datapoints in Chart.js
- scattered graph with xAxes of date react-chratjs-2
- Remove top horizontal line in a horizontal bar chart (Chart.js 2)
- chart.js bar chart color change based on value
- Overlapping Bar Chart using Chart.js
- Can not update bar chart values in Chart.js 2.0.0 alpha3
- Chart JS date-hour AxesX
- Chart.js - Ajax response not accept
- Add Data Labels onto a bubble chart on chart.js
- Assigning a value to an object w/bracket notation
- Bar values in Chart.js 2.X - dataset.metadata undefined
- Different color for line segments in ChartJS
- How can I add some text in the middle of a half doughnut chart in Chart.JS?
- Real time colored bar chart
- Chart doesn't display fonts
- Chart JS, ng2-Charts - How to make the label to the right of pie chart instead on top?
- How to use below syntax in chart.js 3.x?
- Chart.js moment locale
- Create a chart on a dynamically created canvas in Angular-chart.js
- Chart.js: how to listen to hover/click events outside of plot area?
- Cannot find module /chartjs.helpers while using chartjs-plugins-datalabels (ReactJS)
- Chart.js scale x values
- Chartjs : showLine depending on value
- ChartJS - Finding the minimum and maximum labels that are inside a pan (When zooming)
- Vue.js: How to retrieve data from API for vue chart.js
- chartjs resizing very quickly (flickering) on mouseover