Skip to content

Commit c9b43fb

Browse files
authored
Merge pull request #1692 from FormidableLabs/bug/chart-background-key
add key for chart background
2 parents 4045485 + 0b7f245 commit c9b43fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/victory-chart/src/helper-methods.js

+2
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ function getBackgroundWithProps(props, calculatedProps) {
5353

5454
const xCoordinate = props.polar ? calculatedProps.origin.x : xScale;
5555
const yCoordinate = props.polar ? calculatedProps.origin.y : yScale;
56+
const parentName = props.name || "chart";
5657

5758
const backgroundProps = {
5859
height,
@@ -61,6 +62,7 @@ function getBackgroundWithProps(props, calculatedProps) {
6162
style: props.style.background,
6263
x: xCoordinate,
6364
y: yCoordinate,
65+
key: `${parentName}-background`,
6466
width
6567
};
6668

0 commit comments

Comments
 (0)