[Viz] legend duplicates percentile options when chart has both left & right Y axes#113073
Conversation
Kuznietsov
left a comment
There was a problem hiding this comment.
Excepting the suggestion, the code LGTM. Tested locally, everything works as expected.
| return m; | ||
| }; | ||
|
|
||
| // For percentile aggregation id is coming in the form `%d.%d`, where first `%d` is `id` and the second - `percents` |
There was a problem hiding this comment.
Nit: The mistake in this comment is my fault. I'd suggest changing %d.%d to %s.%d. The final comment would be:
- // For percentile, the aggregation id is coming in the form
%s.%d, where%sisagg_idand%d-percents.
|
Pinging @elastic/kibana-vis-editors (Team:VisEditors) |
|
@elasticmachine merge upstream |
| import { Aspect } from '../types'; | ||
| import type { Aspect } from '../types'; | ||
|
|
||
| interface Dimension { |
There was a problem hiding this comment.
This type here confuses me because we already have defined a type Dimension in the types folder. Is it different from this type? If yes, it should have a different name. If no, the already existing type should be used
stratoula
left a comment
There was a problem hiding this comment.
LGTM! I tested it Chrome and works fine :D
… right Y axes (elastic#113073) * [Viz] legend duplicates percentile options when chart has both left & right Y axes * Update comment for isPercentileIdEqualToSeriesId * Remove Dimension interface * Replace partial aspect with whole aspect value Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
💚 Build Succeeded
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
… right Y axes (#113073) (#113169) * [Viz] legend duplicates percentile options when chart has both left & right Y axes * Update comment for isPercentileIdEqualToSeriesId * Remove Dimension interface * Replace partial aspect with whole aspect value Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closes #112388
Partial changes from #111378
Summary
The reason for incorrect displaying of chart and its legend was ignoring the case for percentile column id. As it contains percent value after the point, we should take into account only id part before it, while filtering
yAspects.Checklist
For maintainers