[Pie] Split chart "order by" control doesn't work for metrics#123810
[Pie] Split chart "order by" control doesn't work for metrics#123810DianaDerevyankina merged 4 commits intoelastic:mainfrom
Conversation
| return spec.id; | ||
| }} | ||
| sort={sort} | ||
| sort="dataIndex" |
There was a problem hiding this comment.
It make sense to me, @dej611 could you please confirm that it's ok
There was a problem hiding this comment.
Seems fine. But I could not find any documentation about the sorting predicate in the charting library. Maybe @markov00 or @nickofthyme could clarify its usage.
There was a problem hiding this comment.
the dataIndex predicate means: don't sort, take as it comes from the dataset, FIFO.
Please @alexwizp use the enum Predicate.DataIndex rather then a string there
There was a problem hiding this comment.
Ok.... in that case it exactly what we need. Thank you all
|
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
| import React from 'react'; | ||
| import { Accessor, AccessorFn, GroupBy, GroupBySort, SmallMultiples } from '@elastic/charts'; | ||
| import { Accessor, AccessorFn, GroupBy, SmallMultiples } from '@elastic/charts'; | ||
| import { Predicate } from '@elastic/charts/dist/common/predicate'; |
There was a problem hiding this comment.
It looks like @elastic/charts does not export directly the Predicate type. Maybe this should be fixed upstream?
There was a problem hiding this comment.
You are right, sorry about that. Let me export it and I can fix on a subsequent PR ok?
There was a problem hiding this comment.
|
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
dej611
left a comment
There was a problem hiding this comment.
Tested locally with Safari 👍
Closes #121092
Summary
Set
GroupBysort value to "dataIndex" to respect source data columns order.For maintainers