Skip to content

Commit

Permalink
fix(bar): fix animation regression (#1687)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyze authored Jul 14, 2021
1 parent 919f213 commit 1313523
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion packages/bar/src/Bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const InnerBar = <RawDatum extends BarDatum>({
width: number
}
>(barsWithValue, {
keys: bar => `${bar.key}.${layout}.${reverse}.${groupMode}`,
keys: bar => bar.key,
from: bar => ({
borderColor: getBorderColor(bar) as string,
color: bar.color,
Expand Down Expand Up @@ -214,6 +214,17 @@ const InnerBar = <RawDatum extends BarDatum>({
transform: `translate(${bar.x}, ${bar.y})`,
width: bar.width,
}),
update: bar => ({
borderColor: getBorderColor(bar) as string,
color: bar.color,
height: bar.height,
labelColor: getLabelColor(bar) as string,
labelOpacity: 1,
labelX: bar.width / 2,
labelY: bar.height / 2,
transform: `translate(${bar.x}, ${bar.y})`,
width: bar.width,
}),
leave: bar => ({
borderColor: getBorderColor(bar) as string,
color: bar.color,
Expand Down

0 comments on commit 1313523

Please sign in to comment.