villebro commented on code in PR #23644:
URL: https://github.com/apache/superset/pull/23644#discussion_r1162501311


##########
superset-frontend/plugins/plugin-chart-echarts/src/utils/series.ts:
##########
@@ -155,6 +151,84 @@ export function sortAndFilterSeries(
   ).map(({ name }) => name);
 }
 
+export function sortRows(
+  rows: DataRecord[],
+  xAxis: string,
+  xAxisSortSeries: SortSeriesType,
+  xAxisSortSeriesAscending: boolean,
+) {

Review Comment:
   I originally set out to implement this with `lodash`, similar to how 
`sortAndFilterSeries` was implemented, but in this case it felt clearer to 
write this out like this. But if this function looks too explicit I can rewrite 
this with the equivalent `lodash` functions (refactoring should be simple, as 
the tests should work as-is).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to