score:11
Accepted answer
so i was able to get the colors working by doing this:
datasets: [
{
label: "my first dataset",
fillcolor: ["rgba(0,10,220,0.5)","rgba(220,0,10,0.5)","rgba(220,0,0,0.5)","rgba(120,250,120,0.5)" ],
strokecolor: "rgba(220,220,220,0.8)",
highlightfill: "rgba(220,220,220,0.75)",
highlightstroke: "rgba(220,220,220,1)",
data: pokedataset
}
hope this can help someone who has a similar issue!
score:0
the background color will change the color of the bars.
so, you can give different colors to different bar.
datasets: [
{
label: 'my first dataset',
backgroundcolor: ['rgba(0,10,220,0.5)', 'rgba(220,0,10,0.5)'],
bordercolor: 'rgba(0,0,0,1)',
data: pokedataset,
},
],
Source: stackoverflow.com
Related Query
- Can't get bar chart colors in Chart js working in React Js
- Charts.js - Colors for stacked bar on multi-series line/bar chart are not working
- Charts.js - Bar chart different colors for value intervals not working
- Chart js - Get bar width after render
- Angular chart.js onClick is not working - how to get all elements of a bar when it is clicked on
- React ChartJS 2 : Get data on clicking the chart
- Time Series Line chart js in react not working
- Stacked bar chart starting from 0 - ChartJS React
- Chart.js: How to get x-axis labels to show on top of bars in bar chart
- Click on interactive chart.js bar chart and get value for labels and groups in JS
- Chartjs with Vue, Bar Chart Border Radius not working
- Chart.js: Bar chart multiple colors
- Can the colors of bars in a bar chart be varied based on their value?
- How to set X coordinate for each bar with react chart js 2?
- How do I get a different label for each bar in a bar chart in ChartJS?
- I cant get Legend to work for my chartjs donut chart
- Dynamic data in bar chart not rendering React js
- Chart.js in Angular 10: Specified colors not shown in multi-series bar chart (instead random colors)
- Legend color not working with randomly generated background colors in chartjs pie chart
- Vertical align bar chart from chart.js not working
- Unable to create Stacked Grouped Bar Chart with chart.js / react-chartjs-2 in React
- Chart.js colors in bar chart not showing
- How to get clicked bar chart tooltip data?
- How can I get my Chart.JS bar chart to stack two data values together on each bar, and print a calculated value on each bar?
- The colors of the bar chart in chart.js is not showing. I tried background color and fill color but none of it worked
- How can I change the background colors of a bar chart after it has been created?
- How to get bar chart width in pixel
- Chart js bar with the highest value is a different color among the rest - React
- different colors for bar chart with chart.js
- How Can I Get An Instance of a ChartJS Bar Chart Using Angular
More Query from same tag
- How to hide the labels of graphs that are not toggled in ChartJS
- Can't display proper time on chart.js timeline
- Using Radar Chart inside react component
- Statistics page - Load every stats <div> one by one
- Dynamic Pie Chart With Json Data using chart.js
- how to add percentage value to legend field in pie chart using chart.js
- Chart.js - Increase spacing between bottom legend and chart
- ng2-charts angular radar exception
- Applying Callback To One Y-Axis
- Pass data to Chart Js Laravel
- Integrate chart.js with single javascript file
- Y-axis scale uneven
- Chartjs plugin label in Angular app moving unexpectedly at hover
- Chartjs show labels but not ticks
- Chart.js line chart not showing point on top most value
- How to loop over Chart.js with Django list view
- Re-running chart.js with different variable
- Unable to draw a scatter chart with vue-charts
- How to format date parsed from ASPX JSON via AJAX?
- How to assign specific colors to data items in a doughnut chart in Angular Chart?
- How to change states for making dynamic pie chart?
- chart.js bar chart x-axis label disappeared
- I wanna make this chart using chartjs In reactjs
- How to hide labels by two ticks? chartjs
- charts disappear if rendered in hidden divs
- Chartjs in Reactjs - how can I update data dynamically?
- How to get chart from data points (arrays) with inconsistent time intervals and chart.js?
- angular chartjs not showing data properly
- How we embed google analytics chart from google analytic with angular 4?
- Regrouping data chartjs