Skip to content

Bar legend patterns not showing after update #2813

@mnai01

Description

@mnai01

Describe/explain the bug
legend patterns dont show anymore after upgrading. bars still get the pattern defs + fill fine, but the legend symbols stay solid (or wrong). same exact chart config works on older nivo, breaks on newer nivo.

To Reproduce
i made a codesandbox with 2 versions side by side (or 2 forks):

  1. old deps: react 16 + @nivo/bar 0.62.0 → legend shows patterns correctly
  2. new deps: react 18 + newer @nivo/bar (ex 0.99.0) → legend does NOT show patterns, only solid color

same code: defs + fill for fries/sandwich patterns, legend uses dataFrom: "keys".

Expected behavior
legend symbols should reflect the same pattern fills as the bars (ex fries = dots, sandwich = lines) like it used to.

Additional context
codesandbox links:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions