score:0
in charts the data-set must be an array of data, where the data in-turn is itself an array
i.e)data-set: [data_1, data_2, data_3],
where data_1=[1,2,3,4,5]; data_2=[45,32,12,25,12];..
and the series
represents the corresponds the data.
but here in your case the data-set is an array of numbers, which is why the legend becomes undefined
.
$scope.chartdata = {
data: [[20, 20, 20, 20, 20, 20, 20]],
labels: [
"joe",
"jason",
"mark",
"mike",
"ryan",
"sean",
"stephanie"
],
series: ['year 2016' ]
};
Source: stackoverflow.com
Related Query
- angularjs chartjs legend undefined
- Custom Legend with ChartJS v2.0
- Chartjs cannot read property datasets of undefined
- Chartjs Bar Chart Legend
- ChartJS display legend
- Chart.js legend text showing undefined
- How to add label for ChartJs Legend
- Change Chartjs Legend Icon Style
- TypeError: Cannot read property 'defaults' of undefined when using the react wrapper of chartjs
- ChartJS bar chart with legend which corresponds to each bar
- ChartJS with AngularJS - Canvas won't display anything
- How to change the color of legend in chartjs and be able to add one more legend?
- How to create custom legend in ChartJS
- How can I force my ChartJS canvas legend to stay in a single column?
- Chartjs hide dataset legend v3
- Removing ChartJS 2 border and shadow from point style legend
- How to add ChartJS code in Html2Pdf to view image
- Unable to hide Legend in Chartjs with PrimeFaces7.0
- chartjs - multi axis line chart - cannot read property 'min' of undefined
- ChartJS do not render any legend if the label is falsy
- ChartJS show value in legend (Chart.js V3.5)
- ChartJs chart in typescript: Object is possibly undefined in useEffect
- ChartJS - Adding legend title into tooltip title
- How do I add time sourced from an external source as an X axis to a ChartJS graph?
- chartjs Adding percentages to Pie Chart Legend
- ChartJS horizontal chart display legend on each bar
- How do I change axis, title, legend formatting on chartjs template
- chartjs & asp.net: Cannot read property 'labels' of undefined
- Chartjs not working with d3 from csv source
- Chartjs Bar chart shows undefined values
More Query from same tag
- dynamically add canvas for chart.js
- Draw vertical line on horizontalBar at value 2.0
- How to set additional options for Chart.js BarCharts using React-Chartkick
- How can I debug maxTicksLimits in charts.js?
- How can I add a euro sign (€) to all tooltips in my chart js line chart
- Chart JS - single lines (points) tooltips
- System.ArgumentException: Column 'COLUMN_NAME' does not belong to table
- Fade other lines when hovering legend in Chart.js
- Chart js shows old data on mouse hover
- How to create a dynamic multi-line chart in chart.js
- How to plot a line chart in ChartJS?
- Chartjs 2 Line Graph Single Stroke Between Datasets
- Chart.js - x-axis and tooltip label shows "undefined" in Chrome when browser language is NOT English
- How to draw multiple color bars in a bar chart along a Horizontal Line using chart.js
- Adding custom text to Bar Chart label values using Chart.js
- How to plot a line graph with x and y data
- Custom Legend ChartJS not showing the text decoration: line through
- Chartjs.org Chart only displaying in one page
- How to add background color for doughnut mid using chart,js
- Chart.js chart by passing data through the controller MVC
- How to draw vertical axis in google charts
- Responsive ChartJS in Bootstrap Table Cell
- Type check for getElementById only works with optional chaining, not with type check
- i want display chart based on selected charts using chartJS
- Chart.js - how to make proportional intervals on X axis on line chart
- Adding Image inside Linechart points in ChartJs
- Chart.js bar chart with time on X axis and category on Y axis is not rendered
- Angular Overlapping bars using chart.js
- chartjs add dots to bars in grouped bar chart
- Error trying to switch between different charts