score:0
You have to alter the legendTemplate attribute, to something like this:
legendTemplate : "<ul class=\"<%=name.toLowerCase()%>-legend\"><% for (var i=0; i<datasets.length; i++){%><li><span style=\"background-color:<%=datasets[i].fillColor%>\"></span><%if(datasets[i].label){%><%=datasets[i].label%> : <%=datasets[i].points[datasets[i].points.length-1].value%><%}%></li><%}%></ul>"
Source: stackoverflow.com
Related Query
- how to add percentage value to legend field in pie chart using chart.js
- How to create single value Doughnut or Pie chart using Chart.js?
- How to show percentage (%) using chartjs-plugin-labels ( Pie chart ) in angular 2/8
- ChartJS version 3 how to add percentage to pie chart tooltip
- how to add legend in pie chart
- How to show slice value inside of slice in pie chart using chart.js
- How to add the value for each label to pie legend
- ChartJS - How to add Text between Pie Chart and Legend
- How to add a coloured legend box to a pie chart with Chart.js v1?
- How to add percentage after value data in chart
- How to add text inside the doughnut chart using Chart.js?
- How to add an on click event to my Line chart using Chart.js
- How to add text in centre of the doughnut chart using Chart.js?
- Angular chart how to show the legend data value by default along with legend name
- Using chart js version 3, how to add custom data to external tooltip?
- How to add null value rows into pandas dataframe for missing years in a multi-line chart plot
- How to sort XY line chart tooltip items based on value and add thousands separators?
- How to add text inside the doughnut chart using Chart.js version 3.2.1
- How can I re-distribute values within a charts.js pie chart when a legend item is turned off/on?
- how to increase space between legend and chart in chartjs (ng2charts ) using angular
- How add the sizes of the slices in the pie chart (at the top) in Chart.js?
- how to add Thousand separator in pie chart tooltips of charts.js
- How to create a Doughnut chart in django admin interface using foreign key field data?
- ChartJS Pie Chart How default just show 2 legend datas
- How to add text inside the doughnut chart using Chart.js AngularJS 2.0?
- How to display the values inside the pie chart of PrimeNG (chart) using JavaScript or Angular
- How to add image inside the doughnut chart using chart.js?
- Pie chart legend styling using Chart js
- How to show symbols after the label and before the numeric value using chart.js Bar chart in Angular
- How to set up a simple pie chart using React in ChartJS on codesandbox
More Query from same tag
- React Native Updating State with Api
- Chart.js Time series - x axis that change depending on timestamp
- Trying to create a custom tooltip in a doughnut chart using chartsjs, but it is not working
- Chart.js bar chart barWidth is Inconsistent
- How to create a gradient fill line chart in latest Chart JS version (3.3.2)?
- Unix Timestamp Chart.js with PHP echo
- Chart.js: Can I change the "OriginalOptions" variable within the chartjs-zoom-plugin?
- Adding Image inside Linechart points in ChartJs
- Create PDF with mpdf and chart.js
- How to remove labels from ng2-chart(chart.js)
- Chart JS Displays Only Bigger Dataset But Has Both Datasets?
- Angular 2 ng2-charts donut add text
- ChartJS - Finding the minimum and maximum labels that are inside a pan (When zooming)
- chart.js 2, animate right to left (not top-down)
- Dates not displaying on X Axis using Chart.Js on MVC 5
- Chart.js - Creating Custom Chart Types
- How to add data to chart.js with a for loop
- Chartjs - Tooltip with Rupee Symbol
- chart.js automatic x axis distributed in time milliseconds
- Chart.js:9352 Failed to create chart. Unable to dynamically create charts
- Chart.js - creating time series freqency chart with JSON data
- Properly scaling xAxis with time in chart.js
- Formatting x-axis labels as time values in Chart.js
- Legend position is not vertically in middle in Donut chart
- How to prevent first/last bars from being cut off in a chart with time scale
- ChartJS dynamic label
- Number value format with comma and two decimal points
- Learning Chartjs .destroy()
- ChartJS separate charts per JSON object, and not when hovered over
- chart.js fixed bar width issue