Skip to content

Commit

Permalink
Fixed comparing real value with formatted according to mode. (elastic…
Browse files Browse the repository at this point in the history
…#100456)

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 elastic#822 from elastic/elastic-charts) of geometry with clean value from row info.

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
  • Loading branch information
2 people authored and ecezalp committed May 26, 2021
1 parent 667a4fb commit becc450
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 becc450

Please sign in to comment.