allow to sort series by a field that is not in a series
We have one scenario in which we're adding a series for the purpose of using it in the 'sort by', specific example:
A "Thing" goes trough "Stages" (e.g. Open Doing, Done, Closed). These Stages have a particular order. We'd like a chart of number of Things per Stages.
Right now we the sort by options would only allow us to sort by the Value or the Stages (alphabetically). What we'd like is to be able to provide the order we define.
There are two workarounds but are not ideal:
1. We can do stack bars and put the Order value on top and then change the color to match the background. Issue with this is that because the color is not transparent then it removes the grid lines so it does look somewhat off
- We could prefix the Stages' names with a number. In some cases this also looks off
So the proposed request is to add a way to Sort By a Field that is not being charted
-
Maxence commented
We get the same requirement. In our cases it's `status` too and order of the status in the legend and in the chart should not be alphabetical.
-
Nikola commented
We have a similar use case where the values on the X-axis are commit sha-s (so pretty random), but we want to order them by date - i.e. oldest commits are to the left, newest - to the right. We do have the date as a field in the document, but there's no way to specify the x-axis sort to use that field. Similarly to Julio, we workaround it by adding a computed field that is { $concat: [ { $toString: "$runId" }, ": ", "$commitSha" ] }, but that's less than ideal.