Skip to content

Reverse

The boolean attribute reverse is used to reverse the colors, labels, ticks, and classes of the scalebar. In a vertical layout, the values will then run from bottom to top.

Note: To only flip the colors the colorReverse attribute can be used.

Code

html
<dv-scalebar reverse colors="#bbb,#444" labels ticks="5"></dv-scalebar>
<dv-scalebar reverse colors="RdPu" labels="1,2,3,4" classes="0,.1,.3,.6,1" ticks></dv-scalebar>

<dv-scalebar reverse vertical colors="#bbb,#444" labels ticks="5"></dv-scalebar>
<dv-scalebar reverse vertical colors="RdPu" labels="1,2,3,4" classes="0,.1,.3,.6,1" ticks></dv-scalebar>

Result