I noticed that the legend in stacked bar charts sh...
# gooddata-platform
m
I noticed that the legend in stacked bar charts show in reverse order from the chart. Is there any way to have both the legend and the chart to show the items in the same order?
j
Interesting 🤔 We use Highcharts to render most of our GoodData charts and I guess this is its default behavior. I'm also familiar with Recharts library where I experienced the same problem as well in the past. I'll let someone else on GD side comment, but I don't think there's an easy way to change that… maybe some trick with attribute sorting @Michal Hauzírek @Dan Homola
m
@Jiri Zajic - Thanks! Yeah, I already have sorting for the attributes, and they show in the appropriate order... just opposite one another between the legend and the chart.
d
Hi, that is an interesting catch! According to Highcharts, they have a flag for this https://api.highcharts.com/highcharts/legend.reversed and the example linked there looks like what @Mitchel Roling is suggesting. @Jiri Zajic can you please add this suggestion to Productboard?
m
Great! So if I'm reading this correctly, switching the legend sorting isn't something Good Data currently supports but would be an easy addition since Highcharts supports it? @Dan Homola
d
@Mitchel Roling yes, we currently do not support it. While the native support in Highcharts certainly makes this easier, the effort to add that is not so small as it might seem as we need to make this configuration available also in the Analytical Designer, store it in the metadata, etc. While this should not be particularly hard, it is not a one line change 🙂
m
@Dan Homola - Yes, totally understand that you can't just add a line of code and call it a day 🙂. I'll keep an eye on the release notes but won't make any promises to my own clients that this feature is coming anytime soon.
d
Thank you 🙂
m
Also, I just wanted to say the other new data sorting features in analytical designer have been GREAT! Not sure if you both had a hand in that, but it has made a huge difference @Dan Homola /@Jiri Zajic
❤️ 1
d
Thank you for the kind words, it means a lot 🙂 I was not personally involved that much but I will pass it to the people that were
🙌 1