Hello, I am facing a issue while using BarChart co...
# gooddata-ui
b
Hello, I am facing a issue while using BarChart component. the chart is rendering with different "SortOrder" if there is no default sort order is applied on a insight. Can someone help on this?
j
Hi Bhupesh*,* Can you please confirm what SDK version are you using? Also the code snipper might help here with the investigation. Feel free to send screenshots as well.
b
@Julius Kos I am using 9.0.1.
Getting insight data from analyticalWorkspace.
In case when there is no sort order applied manually in gooddata, we are getting blank array in "sorts" property in api response and insight is getting rendered with different sort order than gooddata.
r
Good morning Bhupesh, Radek from the GoodData Technical team here, let me have a look into this and come back to you! 🙂
Hmm, I feel like the sorts array returning blank when no sort order applied makes sense, but the different default sort order isn't ideal for sure. Can you try going up to a more recent (or ideally the most recent) version of GD.UI? We're currently up to v10, and if there were fixes applied, these would most likely be to the latest v9 as well. Alternatively, the workaround would be to apply a default sort if the sorts array comes blank 🙂
b
@Radek Novacek Can you tell me how to get the values for default sort as it requires "Locator" also.
and do you know if there are fixes available in v10?
👀 1
r
For the default sort, I believe the sort order should be by the date attribute in ascending order; there are some nice examples in our gallery that should help point you in the right direction when it comes to changing up your implementation! 🙂
b
@Radek Novacek while i am trying to use default sort by sending an blank array [], the data is not getting sorted on my dashboard as same as on gooddata.
👀 1
r
Hmm, could you try to make the default sort follow the same logic then? As in
[newAttributeSort(monthDate, asc)]