Skip to main content
Question

Lobby element bar chart Order by

  • February 5, 2021
  • 3 replies
  • 632 views

Forum|alt.badge.img+7
  • Do Gooder (Customer)

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 replies.

3 replies

samuelandlopes
Hero (Former Employee)
Forum|alt.badge.img+10
  • Hero (Former Employee)
  • February 9, 2021

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


Forum|alt.badge.img+7
  • Sidekick (Employee)
  • April 28, 2021

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


AlexSharp
Sidekick (Partner)
Forum|alt.badge.img+5
  • Sidekick (Partner)
  • July 6, 2021

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.