1
I’m doing an angular Chart.js and need to place the percent ( % ) at the end of each tooltip where it shows the value on the chart.
Follow code from my chart:
Html:
<canvas class="chart chart-doughnut" chart-data="vm.data" chart-labels="vm.labels" chart-colors="vm.colors" chart-options="vm.options" ng-init="vm.chart()"></canvas>
JS:
vm.chart = () => {
vm.labels = ["D1", "VC1", "Internacional", "À cobrar", "0300", "Gratuita", "Locais"];
vm.colors = [ '#f36e20', '#8aca7b', '#0bc4df', '#272343', '#389223', '#f1a80a', '#1e75eb'];
vm.data = [10, 10, 20, 10, 10, 10, 30];
vm.options = {
}
}
Does anyone know if it is in the options that I enter this option?
vm.data only accepts integers, it may have some method of inserting decimal values and with them %.
What text appears in tooltip?
– Sam
Value of vm.data appears.
– Maurício Krüger