question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bar chart: specify color per bar?

See original GitHub issue

Currently, chart.js allows to use a fillColor per dataset, which determines the color for all bars representing that dataset.

Is it also possible to customize the color per bar ?

For example, a fillColors (note: plural) which, as opposed to fillColor, doesn’t contain just one fillStyle, but is actually an array with a separate fillStyle for each bar? (it should contain just as many elements as data)

That’d be awesome 😃

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
tannerlinsleycommented, Aug 4, 2015

fillColor has been deprecated in favor of backgroundColor. Try using the dataset property backgroundColor: ["rgba(220,220,220,0.5)", "rgba(151,187,205,0.5)"], ... (note that it is not plural)

0reactions
tannerlinsleycommented, Aug 5, 2015

Closing for now, follow #1261 for a fix on the color string issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Control the color of barplots built with matplotlib
You can change the color of bars in a barplot using color argument. RGB is a way of making colors. You have to...
Read more >
Vary the colors of same-series data markers in a chart
In a chart, click to select the data series for which you want to change the colors. · Click the Format tab and...
Read more >
Setting Different Bar color in matplotlib Python [duplicate]
Any ideas on how to set different colors for each carrier? As for example, AK would be Red, GA would be Green, etc?...
Read more >
How to set Colors for Bars in Bar Plot in R?
To set colors for bars in Bar Plot drawn using barplot() function, pass the required color value(s) for col parameter in the function...
Read more >
Basic R barplot customization
Basic R barplot customization · Start basic: the barplot() function · Custom color · Title, Axis label, Custom limits · Horizontal barplot ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found