Skip to content

Background fill with stacked bar chart does not render correctly (zindex) #2826

Description

@sdwvit
  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Have stacked bar chart and add background={{fill: "#333333"}} to Bar component

What is expected?

Bars are rendered correctly
Screen Shot 2022-04-11 at 7 45 09 PM

What is actually happening?

Bar's background covers other bars in a stack
Screen Shot 2022-04-11 at 7 45 28 PM

Environment Info
Recharts v2.1.6
React 16.8.6
System macos 12.3.1 with intel processor
Browser Chrome Version 100.0.4896.75 (Official Build) (x86_64)

Any workaround would be much appreciated

Metadata

Metadata

Assignees

Labels

bugGeneral bug labelenhancementEnhancement to a current API

Type

No type

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions