Dear ODS Community
Is there a way to sort a stacked bar plot according to the total value of the individual bars. Looking at the example in the image, I would like the bar for “Wohnzonen” to be on top and the bar for “weitere_Bauzonen” to be at the bottom. Here is the code for the barplot:
<ods-chart scientific-display="false"
single-y-axis="true"
labels-x-length=100
label-x="Hauptnutzung">
<ods-chart-query context="dvsareraum20250224"
field-x="ch_hauptnutzung_name"
reverse-stacks="true"
stacked="normal"
series-breakdown="standueberbauung_aggregiert"
sort="serie1-1">
<ods-chart-serie expression-y="flaeche_ha"
chart-type="bar"
index="0"
function-y="SUM"
color="range-custom"
display-values="true"
display-units="true"
scientific-display="true">
</ods-chart-serie>
</ods-chart-query>
</ods-chart>