score:10
Accepted answer
I think this is because you don't use the correct properties. According to the docs (http://www.chartjs.org/docs/), you should use backgroundColor
, not fillColor
.
See the first example in the doc: http://www.chartjs.org/docs/#getting-started-creating-a-chart
datasets: [{
label: '# of Votes',
data: [12, 19, 3, 5, 2, 3],
backgroundColor: [
'rgba(255, 99, 132, 0.2)',
'rgba(54, 162, 235, 0.2)',
'rgba(255, 206, 86, 0.2)',
'rgba(75, 192, 192, 0.2)',
'rgba(153, 102, 255, 0.2)',
'rgba(255, 159, 64, 0.2)'
],
borderColor: [
'rgba(255,99,132,1)',
'rgba(54, 162, 235, 1)',
'rgba(255, 206, 86, 1)',
'rgba(75, 192, 192, 1)',
'rgba(153, 102, 255, 1)',
'rgba(255, 159, 64, 1)'
],
borderWidth: 1
}]
Note that strokeColor
doesn't exist aswell.
Source: stackoverflow.com
Related Query
- Chart looks only grey, does not show the color - Chartjs,discordjs
- chart.js color not rendering
- Chartjs not rendering chart and no error thrown
- Chart JS not rendering on iOS devices
- Chartjs (Non Vue) Not Rendering Graph Chart inside V-if/V-show
- Chart not rendering w/Chart.js on button click
- Chart.js chart not rendering
- Chart.js Date and Time Bar Chart Not Rendering - Line Works Though
- Chart JS chart not rendering in ArcGIS popup when using navigation arrows
- Background color of the chart area in chartjs not working
- charts js, doughnut chart not rendering tooptips correctly
- Passing Array to Chart.js not working, chart not rendering
- Why is this bar chart using chart.js not rendering in react.js?
- Chart not rendering with pug/jade and nodejs
- Dynamic data in bar chart not rendering React js
- PrimeNG chart js is not rendering
- Legend color not working with randomly generated background colors in chartjs pie chart
- Chart.js not rendering chart with data from mySQL database
- ChartJS line chart x = y not rendering astraight line
- The colors of the bar chart in chart.js is not showing. I tried background color and fill color but none of it worked
- Vue-chartjs not rendering chart until page resize
- donut chart not rendering with csv data chart.js
- Chart is not rendering properly time axis
- Chart not rendering on ChartJS
- Chartjs chart not rendering with pug template
- I am using chart js to draw a chart. I did everything right but i don't know why the x axis and y axis label is not comming in chart. code below
- Chart JS not re rendering in Laravel Livewire
- Background color does not work when trying to create my data before using scatter chart with chart.js
- Line chart not rendering data
- My choice of color is not used in my stacked bar chart
More Query from same tag
- How to disable event during a state change
- How can I change only a specific option in a chart with chart.js?
- Inserting and Fetching values from mongodb using nodejs and chartjs
- How to hide Chart.js data labels for small screens
- Chart.js doughnut chart comes bigger and bigger
- how to add color to each data in chartjs scatter plot
- Chartjs doughnut segment pattern
- Chart js: I'm getting the labels crossed on my pieChart and doughnut. Not able to get the chart itself
- Combo line and bar chart. how can i render line in middle
- How to remove only one specific dataset label chartJS?
- Charts.js: Load new data set to an existing chart
- ChartJS Line Chart shoud not start at 0 with all Lines
- Add value to the labels on chartnewjs legend
- Charts.JS Bars Not Alternating Color
- Remove zero values from tooltip
- Limit chart.js X axis ticks
- Which type of chart is this in Chart.js?
- Chart Js Data transformation using Javascript
- Want to draw data using chartjs in django
- chart.js d3js chart in time scale, data from CSV file
- How to create a chart.js scatter chart with data from two lists
- React without npm - is it possible to import libraries / modules?
- Is there a way to change part of the title to another font style or set a custom title format in Chart.js?
- Chart.js labels of x-axes makes useless space in chartarea
- ChartJS and Laravel5
- How to decrease the interval for Horizontal Stacked bar in ChartNew.js?
- inject a bar chart into a webpage via content script
- How to include many datapoints to plot in chart.js
- Chart for Real time data with duplicate x axis
- ChartJS with AngularJS - Canvas won't display anything