score:1
Accepted answer
according to mentioned http://www.chartjs.org/docs/#chart-configuration-legend-configuration, you need to add legend
to options
:
chart.bar(canvas, {
data: data,
options: {
legend: {
position: "bottom"
}}
})
see working jsfiddle.
Source: stackoverflow.com
Related Query
- chart js how to fill legend box with colour
- Chart js: how can I align the legend and the title
- Angular chart how to show the legend data value by default along with legend name
- how to add percentage value to legend field in pie chart using chart.js
- how to add legend in pie chart
- 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 can i give the full Legend a background color in chart js?
- ChartJS Pie Chart How default just show 2 legend datas
- How to show/hide animation when legend clicked chart js
- How to print a chart rendered by code
- How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?
- How to remove the Legend of chart from angular Chart.js
- how to change point style legend to diamond in chart js
- How can I move chartJs legend left side and change the width and Hight of the chart?
- ChartJS - How to add Text between Pie Chart and Legend
- How to increase the size of the donut or pie chart and keep the legend next to it in chart JS?
- How do I destroy/update Chart Data in this chart.js code example?
- how to highlight the bars in stacked bar chart of chart.js on clicking a legend
- How get values on legend label withn Chart js on Angular
- How can I add functionality to Chartjs Doughnut chart custom legend
- How to add legend on chart js annotation
- How to run Chart.js samples using source code
- How to add a coloured legend box to a pie chart with Chart.js v1?
- how to not repeat code while creating multiple charts in chart js
- How do I increase the space between the Legend and the Chart when using angular-chart.js?
- How to add text inside the doughnut chart using Chart.js?
- How to clear a chart from a canvas so that hover events cannot be triggered?
- Chart.js - How to set a line chart dataset as disabled on load
- chart js 2 how to set bar width
More Query from same tag
- Changing style of individual point Chart.js
- How to change default label of each bubble in bubble chart using chartjs-plugin-datalabels
- How can I assign dynamic data from service via subscribe to doughnut chart in angular?
- chartjs data labels - character level font colour control
- Hide legends in Chartjs
- Set Y axis at the top of each bar using Chart.js library
- How to mapping variable data for pie chart (react.js)
- Customize different tooltips of bar chart
- subcategories for each bar in multibar chart using chartjs
- How to add space Between Columns in Bar chartjs and remove the space in the end
- Remove padding from chartJs horizontal bar chart
- Click every label onload ChartJS
- ChartJs error in displaying my array data
- How can I achieve something like this image with chart.js(react-chartjs-2)?
- Dashboard grid - Chart.JS and CSS- issue widening two small horizontal bar graphs - noob question
- Place tooltip on the outer side of the doughnut chart
- How to display specific time label in x-axis by Chart.js?
- Barchart reducing space between bars
- Make Line Chart Dynamic From JSON File Using Chartjs
- Page break in Angular with Chartjs and tables
- How to get rid of the line on top of every point on a line chart (Chart.js)
- How to print a chart rendered by code
- Chart.js not showing in my view
- How to allow zooming in between range only in chartjs-plugin-zoom
- Chart js: I'm getting the labels crossed on my pieChart and doughnut. Not able to get the chart itself
- How to make a 30days chart responsive on mobile using chart.js?
- How to draw multiple lines in chart.js
- Allow display of multiple data attributes in tooltip of Chart.js
- Unable to get chartjs to draw a chart with dynamic data (variable not hardcoded)
- Is there a max width of canvas Chart.js can draw charts within?