score:0
Accepted answer
i found the solution. i have to specify the colors outside of the datasets like the following:
this.realtimeusage.colors = [
{
backgroundcolor: ["rgba(255, 165, 0, 1)"]
},
{
backgroundcolor: ["rgba(171, 219, 0, 1)"]
},
{
backgroundcolor: ["rgba(253, 216, 53, 1)"]
}
];
Source: stackoverflow.com
Related Query
- My choice of color is not used in my stacked bar chart
- Charts.js - Colors for stacked bar on multi-series line/bar chart are not working
- Chartjs Stacked bar chart not displaying correctly
- ChartJS: Grouped Stacked Bar Chart not Grouping
- The colors of the bar chart in chart.js is not showing. I tried background color and fill color but none of it worked
- ChartJS stacked bar chart not displaying as stacked
- Chartjs v2.0: stacked bar chart
- Horizontal stacked bar chart with chart.js
- Vertical stacked bar chart with chart.js
- Chart.js: bar chart first bar and last bar not displaying in full
- Chartjs 2 - Stacked bar and unstacked line on same chart with same y axis
- Click event on stacked bar chart - ChartJs
- How to create stacked bar chart using react-chartjs-2?
- Chart.js bar chart : Grid color and hide label
- Hide empty bars in Grouped Stacked Bar Chart - chart.js
- How to display inline values in a stacked bar chart with Chart.js?
- Different color for each column in angular-chartjs bar chart
- Chart looks only grey, does not show the color - Chartjs,discordjs
- angular-chart.js bar chart with 100% opacity color
- Showing Percentage and Total In stacked Bar Chart of chart.js
- Stacked horizontal bar chart along total count with chart.js
- Stacked bar chart results in misaligned bars
- Multiple stacked bar chart using ChartJs
- Chart.js: Minimum value for x-axis at horizontal stacked bar chart
- chart.js bar chart color change based on value
- How to set single color on each bar in angular chart js
- Add a custom label to the top or bottom of a stacked bar chart
- Stacked bar chart starting from 0 - ChartJS React
- In Stacked horizontal bar chart how to remove the vertical line in Chart.js?
- Click event of stacked line chart not working
More Query from same tag
- I'm new to node.js, and I'm working on getting a pie chart working
- Empty circle - only point strok in line chart for ChartJS
- ChartJs showing wrong labels of data (x-axis dates)
- Gauge Chart using Chart.js V3
- How do I change the bar colors in chart.js barcharts?
- Add value to horizontal bar in chart.js
- Chart JS version 3 not showing in pdf for engine wkhtmltopdf
- Chart.js responsive option - Chart not filling container
- Is there a way to align title and legend on the same line?
- Chartjs 2 Line Graph Single Stroke Between Datasets
- Limit chart.js X axis ticks
- Chart.js bar chart: show tooltip on label hover
- How to load data values from cookie into Chart.js
- Multi dataset line graph from table
- Chartjs: Overlapping values when using Datalabels plugin
- chart.js how do we extract clicked var?
- Chartjs bar min, max and avarage value
- chart js: when all the values passed to data are zeros, nothing is showing
- what is `dart.js` in chartjs.dart example
- Draw line on Chart.js bar
- What can I do to ensure that my charts diagram reload every time I choose it from my dropdown?
- Add border to Chart.js tooltips
- Possible to hide Chart.js grid lines that extend beyond chart?
- Is there a way to change part of the title to another font style or set a custom title format in Chart.js?
- How to set a time scale to a ChartJS chart from JSON?
- Display point style on legend in chart.js
- How to apply each color to each dataset
- Chart section is empty
- How to resize Chart.JS element in React.js?
- chart js different callback labels