score:0
i'm not sure if i got it. if you're trying to set the legends of the graph you need to set it in the chart options, not setting chart-legend to true. you're html should be like:
<canvas id="bar" class="chart chart-bar" chart-data="datta" chart-labels="labels" chart-options="chart-options"></canvas>
than you need to create a $scope.chart-options like:
$scope.chart-options = {
legend: {
display: true,
},
};
you can have more info here: chartjs legend documentation
Source: stackoverflow.com
Related Query
- Customize legend AngularJS
- angularjs chartjs legend undefined
- How to run Chart.js samples using source code
- Customize Pie Chart Legend in chart.js
- Custom Legend with ChartJS v2.0
- Chart.js - Increase spacing between legend and chart
- Chart.js - Styling Legend
- Pie Chart Legend - Chart.js
- Change legend position of ng-charts (using angular2)
- How do I customize y-axis labels on a Chart.js line chart?
- Chart.js legend alignment left side
- Angularjs - Charts.js: Same chart element doesn't redraw on other view
- Chart.js legend took up too much spaces
- Chartjs Bar Chart Legend
- ChartJS display legend
- Chart.js legend text showing undefined
- Chart.js change legend toggle behaviour
- chart js how to fill legend box with colour
- Chart.js: hiding series by clicking on legend
- How to wrap legend text in Chartjs?
- How to add label for ChartJs Legend
- Change Chartjs Legend Icon Style
- ChartJS bar chart with legend which corresponds to each bar
- ChartJS with AngularJS - Canvas won't display anything
- Editing Chart.js legend template
- How to change the color of legend in chartjs and be able to add one more legend?
- Chart.js Legend Customization
- ng2-charts customize data and whole html content of tooltip displayed when hovering on bar chart
- Change Legend Box Outline Chart.js 2
- Chart.js HTML custom legend issues with doughnut chart
More Query from same tag
- Chart.JS fixing maximum and minumum to a location on screen
- Use react-icons for pointStyles in Chart.js graph on Next.js app
- Chart.js glitches and reverts to previous dataset on hover
- How to add new x axis in chart JS?
- Chartjs - legends take up too much space on mobile devices
- chart.js aspect ratio not square
- How can i retrieve and override presets chart.js option in angular selector?
- How to display grouped bar chart using chart.js?
- how I can get label name when user click on particular area in doughnut chart.js? I am not able to find the index of selected area for chart.js
- How to get multiple elements on a page using flask (tables, pie charts, etc.)
- Assigning data structures to chartjs properties, NOT individually
- Svelte , pass data to chartjs from API
- How can I cause a legend to appear to the right of the pie (Chart.JS)?
- How can I configure Chart.js in a Electron app?
- Vue watch not noticing changes on component prop
- How can i implement RTL for Yaxis in Chartjs
- How to show data values or index labels in ChartJs (Latest Version)
- Chart.js Text color
- Animating outerRadius and innerRadius
- Chart.js Polar Area Chart scale background color
- Y-axis label in chartjs 2.0.0
- show text in both y axis in dual axis chart js
- ChartJS, nested flexbox, not shrinking
- how to create a bar chart with php data variables
- How to set Solid label in bar chart using Chart JS
- Can't make chart js responsive
- How to change tooltip direction in Chart.js (2.9.4)?
- donut chart tooltip under center text
- Bootstrap modal showing when clicking individual points in Linechart but not in individual bars in Barchart
- JQuery insertAfter() Method only works once when inserting a Chart.js chart