Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Charts
Created by Guest
Created on Aug 5, 2021

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 2. 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
  • Guest
    Jun 24, 2022
    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.
  • Guest
    Aug 11, 2021
    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.