elastic-charts
elastic-charts copied to clipboard
Sorting legend does not work correctly in some cases
Describe the issue
Sorting legend does not work correctly in some cases when there are Area series preceding Line series (or possibly when there are simply multiple series?)
To Reproduce
Case 1:
- Go to https://codesandbox.io/s/xenodochial-ptolemy-w5ftu4?file=/src/App.tsx
- Toggle between "Enable legendSort" & "Disable legendSort" button
- Note that the legend is being sorted correctly/as expected. When sortLegendEnabled === true,
Expected bounds
should be afterThroughput
.
Case 2:
- Go to https://codesandbox.io/s/recursing-euclid-rjr3x0?file=/src/App.tsx
- Note that the legend is NOT being sorted. Even though it uses the same
legendSort
function as Case 1,Expected bounds
still show up beforeThroughput
.
Checklist
- [x] The proper chart type label has been added (e.g.
:xy
,:partition
) - [x] The proper feature labels have been added (e.g.
:interactions
,:axis
) - [x] Every related Kibana issue is listed under
Kibana Cross Issues
list and thekibana cross issue
tag is applied