Skip to content

Commit 1851432

Browse files
committed
Saner order flip for states/cmaps
1 parent fc58b5e commit 1851432

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

panel/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ def update_colors_select(event):
169169

170170
def create_color_pickers(states, colors):
171171
color_picker_list = []
172-
for state, color in zip(states[0][::-1], colors):
172+
for state, color in zip(states[0], colors):
173173
color_picker = pn.widgets.ColorPicker(name=state, value=color)
174174
color_picker.param.watch(update_colors_select, "value")
175175
color_picker_list.append(color_picker)
@@ -179,7 +179,7 @@ def create_color_pickers(states, colors):
179179
@pn.cache
180180
def palette(res, colors_picked):
181181
cmaps = [colormap_from_single_color(color_picked) for color_picked in colors_picked]
182-
return sd.palette(res.states, cmaps=cmaps)
182+
return sd.palette(res.states[::-1], cmaps=cmaps[::-1])
183183

184184

185185
@pn.cache

0 commit comments

Comments
 (0)