tremorlabs / tremor

React components to build charts and dashboards
https://npm.tremor.so
Apache License 2.0
16.22k stars 467 forks source link

[Bug]: Unable to update bar colors using `tremor-brand-default` from tailwindConfig.js #1100

Closed aakarsh-kumar-pst closed 4 months ago

aakarsh-kumar-pst commented 4 months ago

Tremor Version

15

Steps to reproduce

What is expected?

Default color for BarChart should get updated

What is actually happening?

Default color for BarChart remains blue

What browsers are you seeing the problem on?

severinlandolt commented 4 months ago

Will take a look later this week!

severinlandolt commented 4 months ago

Hi! Had a closer look at your issue.

The BarChart doesn't employ the tailwindconfig.js colors for the Bar Colors. Changing the DEFAULT token won't change the color in the bar chart. As you can see here, no token targets the default color.

If you wan't to use a custom color, check out our documentation section here: https://www.tremor.so/docs/visualizations/bar-chart#usage-example-with-a-custom-colors

If you need even more control, I'd suggest to have a look at our copy/paste components: https://raw.tremor.so/docs/visualizations/bar-chart