Describe the issue
In the cartesia charts, the small multiple sort predicate dataIndex doesn't use the data index, but just fallback to numAsc, and is not possible to pass a sorted array and have the small multiple dataset sorted by the small multiple value by array index.
default:
case 'dataIndex':
case 'numAsc':
return (a: T, b: T) => {
const aValue = Number(accessor ? a[accessor] : a);
const bValue = Number(accessor ? b[accessor] : b);
return aValue - bValue;
};
}
Expected behaviour
When specifying dataIndex in the sort predicate, the data should reuse the index of the data when it was passed to the chart.
Kibana Cross Issues
elastic/kibana#124318 (comment)
Checklist
Describe the issue
In the cartesia charts, the small multiple sort predicate
dataIndexdoesn't use the data index, but just fallback tonumAsc, and is not possible to pass a sorted array and have the small multiple dataset sorted by the small multiple value by array index.Expected behaviour
When specifying
dataIndexin the sort predicate, the data should reuse the index of the data when it was passed to the chart.Kibana Cross Issues
elastic/kibana#124318 (comment)
Checklist
:xy,:partition)Kibana Cross Issueslist and thekibana cross issuetag is applied