Skip to content

Commit

Permalink
Fixed comparing real value with formatted according to mode. (#100456)
Browse files Browse the repository at this point in the history
Before this part of code was comparing clean data, which came from dataset, with X/Y values. They were true according to normal mode, but in percentage mode, for example, it was comparing absolute value with percentage value. To avoid it, need to compare datum (feature #822 from elastic/elastic-charts) of geometry with clean value from row info.

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
Kuznietsov and kibanamachine authored May 26, 2021
1 parent 29b7d1d commit c42f6c3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ const rowFindPredicate = (
) => (row: Datatable['rows'][number]): boolean =>
(geometry === null ||
(xAccessor !== null &&
getAccessorValue(row, xAccessor) === geometry.x &&
getAccessorValue(row, xAccessor) === getAccessorValue(geometry.datum, xAccessor) &&
yAccessor !== null &&
getAccessorValue(row, yAccessor) === geometry.y &&
getAccessorValue(row, yAccessor) === getAccessorValue(geometry.datum, yAccessor) &&
(splitChartAccessor === undefined ||
(splitChartValue !== undefined &&
getAccessorValue(row, splitChartAccessor) === splitChartValue)))) &&
Expand Down

0 comments on commit c42f6c3

Please sign in to comment.