score:12
i was using chart.js and had the same exception when hovering over a point. when i put my data in double array, the chart did not show anything.
solution: if the chart is of type 'line', it does not take an array of colors for background and border, but single colors. this worked for me:
var chart = new chart(chartcanvas, {
type : 'line',
data : {
labels : dates,
datasets : [{
label : 'error',
data : errorcounts,
backgroundcolor : 'rgba(255, 99, 132, 0.2)',
bordercolor : 'rgba(255,99,132,1)',
borderwidth : 1
}, {
label : 'ok',
data : okcounts,
backgroundcolor : 'rgba(75, 202, 72, 0.2)',
bordercolor : 'rgba(117,239,95,1)',
borderwidth : 1
}
]
},
options : {
responsive : true,
scales : {
yaxes : [{
ticks : {
beginatzero : true
}
}
]
}
}
});
score:42
please make sure that your data is on double array.
ex:
data = [
[10, 20, 30, 20, 10]
];
Source: stackoverflow.com
Related Query
- Unable to parse color in line chart (angular-chart.js)
- angular-chart error on line chart: unable to parse color
- Chart.js line chart set background color
- how to set chart.js grid color for line chart
- Angular 8 & ChartJs change color in pie chart
- Chart.js - Color specific parts of the background in a line chart
- How to set single color on each bar in angular chart js
- Apply color only to lower part of Chart.js line chart
- How to add area with break on line chart with fill color
- Change Axis Line color in Chart created using chart.js
- How to use segment property to color line / border color based on value in chart js?
- change stroke line color in chart according to datasets in react native
- Remove background color in chartjs line chart
- How to change background color of labels in line chart from chart.js?
- Chart JS Line Graph multitooltipkey background color issue
- With Chart js, I am trying to color every 7th vertical (x axis) grid line (representing each week beginning visually)
- angular chart js set fill color of bar chart
- chart.js Is there way to color line chart ticks depending on value
- angular 4 line chart data is not showing data from http get
- How to draw multiple color bars in a bar chart along a Horizontal Line using chart.js
- angular chartjs line chart default options
- ChartJS Line Chart - Points Connected out of order for Timeseries in Angular 6
- how to show only each 15th x-labels in line chart chart.js in angular 6?
- Chart.js 3.6.2, Angular 10: Logarithmic Line chart Y-Axis problems. How to set and keep Y-Axis properties, even when data changes?
- Trouble with setting background color for Line chart at Chartjs version 3.5.1
- Line chart Change background color of shaded region on hover (Chartjs)
- How to change label color of ng2 chart in angular
- Angular 9: Chart.js: Monochromatic(Single color with shades) doughnut chart
- how to create line chart using chart.js in angular 2+
- Multi colored line chart angular and primeng
More Query from same tag
- Angular js pie chart styling
- Custom tooltip styling in Chart.js
- How can i iterate or get all object out of array with object key in Chart.js
- Chartjs Legend Styling
- How to remove the coloured rectangle(dataset label) in chartJS
- Charts.js legend more than view value
- How to parse "hh:mm:ss" strings to time in Charts.js 3.x
- part 2 - how to group duplicate labels in order to create a label without duplicates in chart.js
- hover mode on Chart.js
- Create a pie chart using an array from a data table in chart.js
- Cannot read property 'length' of null error in Javascript
- Glow effect on line bar using Chart.js in React
- How to use dates as X axis with Chart.js even when there is no Y axis value related
- ChartJS on NodeJS: error Chart is not defined
- Chartjs, scatter with For-Loop
- Two pie charts in one flexbox container
- Chart.js Polar Area Chart is not scale right
- Trying To Change only each Label's title in angular Chartjs
- How to set default colour for bars in Chart.js
- Increase point radius when tootip shown for certain data on Charts.js
- How to reformat tooltip in Chart.js?
- How to use two Y axes in Chart.js v2?
- Chart.js maxBarThickness option not working
- Add Y-Axis dynamically Chartjs
- How to change color of column in chart js
- ChartJs multiaxis chart show different label bottom and top
- Customize different tooltips of bar chart
- Chartjs-2(React), Lines do not appear
- How to display value labels above graph bars using chart.js
- How to print angular-chart