Skip to main content
Question

Lobby element bar chart Order by

  • February 5, 2021
  • 3 replies
  • 566 views

Forum|alt.badge.img+7
  • Do Gooder (Customer)
  • 22 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

samuelandlopes
Hero (Former Employee)
Forum|alt.badge.img+10
  • Hero (Former Employee)
  • 75 replies
  • February 9, 2021
awe wrote:

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)
  • 18 replies
  • 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)
  • 23 replies
  • 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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings