score:8
Accepted answer
you can use tooltips callback in chart.js to change the tooltip suffix. here is an example on how to add %. i hacked this together by doing some searches and finding other examples.
https://jsfiddle.net/nt50dzb7/
options: {
tooltips: {
enabled: true,
mode: 'single',
callbacks: {
label: function(tooltipitem, data) {
var alldata = data.datasets[tooltipitem.datasetindex].data;
var tooltiplabel = data.labels[tooltipitem.index];
var tooltipdata = alldata[tooltipitem.index];
return tooltiplabel + ": " + tooltipdata + "%";
}
}
}
}
}
Source: stackoverflow.com
Related Query
- How can I show percentages when hovering over my chart?
- How can I show "No Data" message in Pie Chart when there is no data using VueJS?
- How can I display both values as labels when hovering over chart.js
- Moving vertical line when hovering over the chart using chart.js
- Why can I not see a data value when hovering over a point on the radar chart?
- How can I show Bootstrap modal when on click in individual bars in chart.js
- canvas fill text vanishes when hovering over chartjs pie chart
- How can I show a subset of data on pie pieces in Chart.JS while still displaying the superset when hovering?
- Highlight chart element when hovering over its corresponding legend Item
- How can I build a double doughnut chart that spins when triggered
- How can I re-distribute values within a charts.js pie chart when a legend item is turned off/on?
- ChartJS: Highlight dataset in a stacked bar chart when hovering over the legend?
- React & Chartjs: How can I best destroy my chart when re-rendering?
- how can i show labels and value in both on bar chart
- How to show tooltip only when data available in chart js?
- ReactJS - Moving vertical line when hovering over Line chart using chart.js v3.7.1
- How can I remove the white border from Chart.js pie chart when all legends are hidden?
- Moving vertical line when hovering over the chart using chart.js in v2.9.4
- Charts with previous data appear when hovering the cursor over the chart in Chart.js
- How can I make lines fully connected in a multi-line chart even when one dataset is more sparse than another?
- Trigger bar/pie graph highlight when hovering over an external element [chart.js / chart js] [AngularJS] [angular-chart.js]
- How can labels/legends be added for all chart types in chart.js (chartjs.org)?
- Chartjs Bar Chart showing old data when hovering
- How can I create a horizontal scrolling Chart.js line chart with a locked y axis?
- How can I make two of my lines in Chart JS thicker
- Chart.js how to show cursor pointer for labels & legends in line chart
- How can I make a stepline or stepped chart in chart.js or D3?
- chartjs show dot point on hover over line chart
- ChartJs line chart repaint glitch while hovering over
- chart js tooltip how to control the data that show
More Query from same tag
- Unable to hide Legend in Chartjs with PrimeFaces7.0
- Combo bar chart graph line gets obscured by bars
- chartjs-node-canvas doughnut chart
- how to highlight bar in ChartJS with onkeyup Input
- Chart.js - How to push a collection of array into dataset
- React-Redux and Chart.js props Do not rerender
- How do I run Chart.js with Angular 10 SSR / universal?
- Chart.js : straight lines and curves lines in the same graph
- Give '%' on Bar Chart Datalabel Chartjs
- How to remove the inside-border from doughnut chart? Chart.js
- How to filter shadow or Drop Shadow in Chart.js?
- how to add simple option to chartjs correctly
- Dropdown component not having effect in Chromium browser
- Convert PHP array to chart.js compatible data
- Charts not rendering properly in Angular
- How to group and count missing values using linq
- How to create a bar and a line in a same graph using chart.js in React?
- ChartJS - adding scroll to horizontal legend in Line chart
- Legend not displaying on Line or Bar chart - React-Chartjs-2
- daily activity chart using PHP MySQL
- Object.values not seperated by parentheses / Chartjs only displays first element of array
- Updating Chartjs to 2.5 with custom code
- Chart.js x-axes not working?
- ChartJS pie chart with simple parsing options doesn't render, only works when set as bar/line chart
- How to use plugins in chartjs and laravel chart consoletvs/chartsjs
- ChartJS glitches
- Chart js data decimation not working, parsing issue
- I am trying to use the Chartjs-plugin-watermark but it is not working
- Cannot read properties of null (reading 'getContext') at new EchartsDropdownComponent
- Vuejs, how to build an object?