Noticed a bug with unsorted data

Answered
Chern Yu Zi asked on April 20, 2026

Hi, 

I have this data that I have already sorted before hand according to their absolute values and would like Flexmonster to keep unsorted (shown below).

However when I set the column to ["timekey"] and the rows to ["industry", "subindustry"], I noticed that because "Banana" appears twice as a subindustry the order of data becomes ordered in an unintended manner. Please advise!

[

    {

        "timekey": "2025-06-30T00:00:00",

        "subindustry": "Apple",

        "industry": "Alpha-1",

        "value": 1000.50

    },

    {

        "timekey": "2025-06-30T00:00:00",

        "subindustry": "Banana",

        "industry": "Alpha-1",

        "value": -900.20

    },

    {

        "timekey": "2025-06-30T00:00:00",

        "subindustry": "Orange",

        "industry": "Alpha-1",

        "value": 500.10

    },

    {

        "timekey": "2025-06-30T00:00:00",

        "subindustry": "Banana",

        "industry": "Alpha-2",

        "value": 600.30

    },

    {

        "timekey": "2025-06-30T00:00:00",

        "subindustry": "Grapefruit",

        "industry": "Alpha-2",

        "value": -200.50

    },

    {

        "timekey": "2025-06-30T00:00:00",

        "subindustry": "Coconut",

        "industry": "Alpha-2",

        "value": 60.80

    }

]

5 answers

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster April 20, 2026

Hello!

Thank you for reaching out to us.

Kindly note that Flexmonster sorts members in ascending order by default. If you want to preserve the sorting from the dataset, please explicitly define unsorted sort in the slice as follows:

 slice: {
      rows: [
        {
          uniqueName: 'industry',
        },
        {
          uniqueName: 'subindustry',
          sort: 'unsorted', //to preserve sort from the data source
        },
      ],
// other slice properties
}

We have prepared an example to illustrate the idea: https://jsfiddle.net/flexmonster/35woq4se/.

You are welcome to check out the following guide for more details about sorting in Flexmonster: https://www.flexmonster.com/doc/sorting/.

Hope you will find our answer helpful.

Kind regards,
Solomiia

Public
Chern Yu Zi April 21, 2026

Hi, 

Please adjust Alpha-2's subindustry as below and you can see the bug (Change Banana's value to 100.3 and you can see it reorder itself to the top). Attaching screenshot as well.

[
    {
      timekey: '2025-06-30T00:00:00',
      subindustry: 'Apple',
      industry: 'Alpha-1',
      value: 1000.5,
    },
    {
      timekey: '2025-06-30T00:00:00',
      subindustry: 'Banana',
      industry: 'Alpha-1',
      value: -900.2,
    },
    {
      timekey: '2025-06-30T00:00:00',
      subindustry: 'Orange',
      industry: 'Alpha-1',
      value: 500.1,
    },
    {
      timekey: '2025-06-30T00:00:00',
      subindustry: 'Grapefruit',
      industry: 'Alpha-2',
      value: -200.5,
    },
        {
      timekey: '2025-06-30T00:00:00',
      subindustry: 'Banana',
      industry: 'Alpha-2',
      value: 100.3,
    },
    {
      timekey: '2025-06-30T00:00:00',
      subindustry: 'Coconut',
      industry: 'Alpha-2',
      value: 60.8,
    },
  ]

Attachments:
bug.jpg

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster April 21, 2026

Hello, Chern Yu Zi!

Thank you for getting back to us.

We have reproduced the described sorting behavior on our side. Our Dev team will take a closer look at the case and be back to you with the fix with ETA May 11th.

Our team will notify you about any updates on the matter.
Feel free to contact us in case any other questions arise.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster May 4, 2026

Hello, Chern Yu Zi!

Hope you are doing well.

Our Dev team has investigated the reported case regarding the unsorted behavior when the same member appears in multiple expanded nodes. We can confirm that this behavior is expected. Since Flexmonster stores each member only once, the component treats repeated instances as the same member, and its first position is applied consistently across all occurrences.

We suggest creating a multilevel hierarchy to distinguish the same member between different parent nodes. Here is the JSFiddle example to illustrate the idea: https://jsfiddle.net/flexmonster/ef5cp2go/.

Please let us know if the suggested approach works for you.

Kind regards,
Solomiia

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 6 days ago

Hello!

Hope you are doing well.

Our team is wondering if you had a chance to try the multilevel hierarchy approach to distinguish the same member between different parent nodes: https://jsfiddle.net/flexmonster/ef5cp2go/. Could you please let us know if the suggested approach works well for your case?

Looking forward to hearing your feedback.

Kind regards,
Solomiia

Please sign in or register to submit your answer