If you get a legend from a geoserver raster the minimum value will be on top, the maximum at the bottom.
<sld:ColorMapEntry color="#FFFFFF" quantity="0" opacity="0" label="0 mm"/>
<sld:ColorMapEntry color="#FFFF81" quantity="1" label="1 mm"/>
<sld:ColorMapEntry color="#B5F557" quantity="2" label="2 mm"/>
<sld:ColorMapEntry color="#6FEB36" quantity="3" label="3 mm"/>
<sld:ColorMapEntry color="#3AD62D" quantity="4" label="4 mm"/>
<sld:ColorMapEntry color="#3DB868" quantity="5" label="5 mm"/>
<sld:ColorMapEntry color="#299E98" quantity="6" label="6 mm"/>
<sld:ColorMapEntry color="#216D9E" quantity="7" label="7 mm"/>
<sld:ColorMapEntry color="#1F3F8C" quantity="8" label="8 mm"/>
<sld:ColorMapEntry color="#0D1079" quantity="9" label="9 mm"/>
<sld:ColorMapEntry color="#000351" quantity="10" label="10 mm"/>
But I would like to change the order and to display the maximum value on top of the legend. I tried to change the order of the sld:ColorMapEntrys but now all the values at the raster has a opacity of 0 and no color.
<sld:ColorMapEntry color="#FFFFFF" quantity="10" label="10 mm"/>
<sld:ColorMapEntry color="#FFFF81" quantity="9" label="9 mm"/>
<sld:ColorMapEntry color="#B5F557" quantity="8" label="8 mm"/>
<sld:ColorMapEntry color="#6FEB36" quantity="7" label="7 mm"/>
<sld:ColorMapEntry color="#3AD62D" quantity="6" label="6 mm"/>
<sld:ColorMapEntry color="#3DB868" quantity="5" label="5 mm"/>
<sld:ColorMapEntry color="#299E98" quantity="4" label="4 mm"/>
<sld:ColorMapEntry color="#216D9E" quantity="3" label="3 mm"/>
<sld:ColorMapEntry color="#1F3F8C" quantity="2" label="2 mm"/>
<sld:ColorMapEntry color="#0D1079" quantity="1" label="1 mm"/>
<sld:ColorMapEntry color="#000351" quantity="0" opacity="0" label="0 mm"/>
Is there a solution to show the standard legend in a reverse order?