Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(area-bump): Return a new serie reference when color or styles change
Consumers of the series object, like the AreaBump chart component itself, might rely on memoization and shallow equality comparisons of incoming props. Mutating the serie object led to a stuck state e.g. on hover, as described in #1301. Mind that we cannot just ``` return { ...serie, color: getColor(serie), style: getSerieStyle(serie) }; ``` as `getSerieStyle` can depend on on the results of `getColor`. The functions therefore need to be applied sequentially and in this order. Fixes #1301
- Loading branch information