Question

Lobby element bar chart Order by

  • 5 February 2021
  • 3 replies
  • 486 views

Userlevel 2
Badge +7
  • Do Gooder (Customer)
  • 21 replies

Hi!

We have problem to get a proper sorting (order by) on the X-axis in Lobby element Bar Chart.

If X-axis is by the type string we don’t manage to get a proper order by.

If we convert X-axis to type number, then we get a proper order by, but not if using string values.

 

In our case we transform a date value to week, using   to_char(datevalue,’YYYY-WI’), for example 2020-11, 2020-12, 2021-01,2021-02.

We using above string format we get an order by that is based on Y-axis showing largest value from Y-axis first independent of X-axis.

We then get the weeks in the X-axis on wrong order….??

 

Is there anyone who now a solution for this, or is this some kind of limitation in the Bar Chart??  

Best regards

Albin


This topic has been closed for comments

3 replies

Userlevel 4
Badge +10

Hi!

We have problem to get a proper sorting (order by) on the X-axis in Lobby element Bar Chart.

If X-axis is by the type string we don’t manage to get a proper order by.

If we convert X-axis to type number, then we get a proper order by, but not if using string values.

 

In our case we transform a date value to week, using   to_char(datevalue,’YYYY-WI’), for example 2020-11, 2020-12, 2021-01,2021-02.

We using above string format we get an order by that is based on Y-axis showing largest value from Y-axis first independent of X-axis.

We then get the weeks in the X-axis on wrong order….??

 

Is there anyone who now a solution for this, or is this some kind of limitation in the Bar Chart??  

Best regards

Albin

hi,

you can use a new column (number or date) in datasource to sort, and in element you can use your string field normaly.

E.g.

Hope it helps

Br

Userlevel 1
Badge +7

Hello Albin,

I am also struggling with order by on a Bar Chart  and just wondering whether you found a way to get the order by working ?

Thank you!

Bhagya

Userlevel 3
Badge +5

I have the same problem I have dates in groupings; what I see is the Bars are ordered by the Value on the Y Axis (with the Highest Qty First), even if I sent in the Order by to be based on the Alias of the Grouping and Ascending or Descending Order.