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
#100636)

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 <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Yaroslav Kuznietsov <kuznetsov.yaroslav.yk@gmail.com>
  • Loading branch information
kibanamachine and Kuznietsov authored May 26, 2021
1 parent 9992e63 commit 166e732
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 166e732

Please sign in to comment.