Conditionally format bar color in reactable table?

I've mimicked this excellent tutorial on adding bars to a reactable table [https://glin.github.io/reactable/articles/twitter-followers/twitter-followers.html]. I'm looking to conditionally color the bars in the table.

In the Twitter Follower example, I'd like conditionally format bar color by the candidate name. Any ideas?

I suspect the solution is somewhat close to what's done here: https://glin.github.io/reactable/articles/cookbook/cookbook.html for formatting by positive or negative values.

Someone who is better at JS than me would probably be able to help out with this issue. You could also open an Issue over on the GitHub for this package, the package maintainer is usually quick to respond.

In fact, it looks like someone is trying to figure out the same thing already with this open issue

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.