score:2
Accepted answer
just add backgroundcolor
to your dataset to change the color of all bars.
...
backgroundcolor: 'rgba(121, 121, 255, 0.2)',
...
if you pass it an array of colors, it will set the color bar by bar for the dataset
...
backgroundcolor: ['rgba(121, 121, 255, 0.2)', 'rgba(255, 121, 121, 0.2)',... ],
...
fiddle - http://jsfiddle.net/l9qsb3h4/ fiddle (bar by bar) - http://jsfiddle.net/0b98k2g8/
Source: stackoverflow.com
Related Query
- Chart.js color is not getting changed
- Chart looks only grey, does not show the color - Chartjs,discordjs
- Pie chart is not getting rendered in ChartJS
- chart is not getting updated from the values it received from Jquery
- Background color of the chart area in chartjs not working
- Chart content not getting displayed in ionic
- Legend color not working with randomly generated background colors in chartjs pie chart
- The colors of the bar chart in chart.js is not showing. I tried background color and fill color but none of it worked
- Chart JS - Bubble Chart is not getting rendered when loaded Dynamically
- Chart js: I'm getting the labels crossed on my pieChart and doughnut. Not able to get the chart itself
- Chart is not populating when getting the data from AJAX call
- getting additional value fields from data source for dx.chartjs doughnut chart
- 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
- The chart is not getting shown when page is loaded
- Background color does not work when trying to create my data before using scatter chart with chart.js
- My choice of color is not used in my stacked bar chart
- Getting the HTML code of a chart created by chart.js
- Getting a Chart is not defined ReferenceError with in React + React-chartjs
- Angular Chart color does not change
- Chart content not getting loaded in popup
- how to not repeat code while creating multiple charts in chart js
- I am getting an issue my chart using chart.js is not appering until i tap 3 time on label button
- Chart area background color chartjs
- ReferenceError: Chart is not defined - chartjs
- How set color family to pie chart in chart.js
- Chart.js: bar chart first bar and last bar not displaying in full
- Chart.js line chart set background color
- Chart JS data labels getting cut
- chartjs datalabels change font and color of text displaying inside pie chart
- Chart.js responsive option - Chart not filling container
More Query from same tag
- Trying to call API and plot a line chart but it does not show
- Chart.js StackedBar doesn't show labels on bar and maximum y-value
- How to remove grid on chart.js
- How to make label always visible on DoughnutChart.js
- Trying to update data in chart.js chart
- Chart.js : straight lines and curves lines in the same graph
- Create IF to change chart.js bar color
- No tooltips on Chart JS line graph
- Chart.js load new data
- Deleting and recreating an element with React
- How could be the best way of implementing a 3D fft chart?
- How do I get tool tips to work on 2 data set half doughnut chart?
- Angular ng2-charts chartsjs-plugin-labels options not working
- How to get data of json file for chart.js diagram
- Hide labels on x-axis ChartJS
- Show chart.js animation only when user scroll on the specific DIV
- In chartjs, add link text on tooltip
- Chart.js find visible data points following zoom
- Chart.js Using A JavaScript Object
- Unable to set Global Options in Chart.js
- how to add color to each data in chartjs scatter plot
- How can I merge multiple HTTP calls to one entity model in Angular
- ChartJS - Uncaught SyntaxError: Unexpected number
- Chartjs tooltip out of page
- No chart appears - Chart.js
- How to address type errors when removing data with chart.js?
- Customize ChartJS Hover Data Format
- How do I place a new line in a label with Chart.js?
- how to show chart using chart js
- Working with multiple date axes in ChartJS