Skip to content

Fill colour derived/contextual to value (Radial Bar) #568

@oller

Description

@oller

Apologies if this is already possible, in which case an explanation would be appreciated and perhaps the docs (or myself) might be missing something!

Is your feature request related to a problem? Please describe.
Say I've a radial bar that I'd like the fill colour to go green if value is greater than 75%, or red if less than 25%. Or perhaps even the fill colour derived by the value, so a different colour for each percentage.

This is of course different to a gradient fill as i'm referring to a single fill colour.

Describe the solution you'd like
To support a fill function that takes the value as a param and can return a colour.

Describe alternatives you've considered
I've tried the updateOptions method to set a fill colour with a derived value, this works, but seems to break the initialising fill animation.

Any suggestions appreciated. Really enjoying working with this lib!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions