Skip to content

[Bug] Rich text in legend does not inherit color from legend configuration if theme specifies textStyle.color #18196

@juliepagano

Description

@juliepagano

Version

5.4.1

Link to Minimal Reproduction

https://codepen.io/juliepagano_cs/pen/XWBzLaJ

Steps to Reproduce

  1. Open the codepen
  2. Note that the non-rich text in the legend is red (the value specified in legend.textStyle.color).
  3. Note that the rich text in the legend is green (the value specified in the theme's textStyle.color).
  4. Click an item in the legend.
  5. Note that the non-rich text in the legend is blue (the value specified in legend.inactiveColor).
  6. Note that the rich text in the legend is green (the value specified in the theme's textStyle.color).
  7. Comment out the textStyle.color in the theme and note that the rich and non-rich text match the legend configuration.

Current Behavior

When a chart's theme specifies textStyle.color, rich text within the legend configuration inherits from the theme's text color instead of the colors configured in the legend.

Expected Behavior

I would expect rich text within a legend to inherit from the legend's color configuration (legend.textStyle.color when active and legend.inactiveColor when inactive).

Environment

- OS: macOS Monterey
- Browser: Chrome 108.0.5359.124 
- Framework: the bug is not framework specific, but we are working in React

Any additional comments?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugdifficulty: easyIssues that can be fixed more easily than the average.enThis issue is in Englishtopic: legend

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions