Skip to content

Commit 27acdac

Browse files
Change values to colormap_labels in _get_data method .
1 parent e1674ce commit 27acdac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ipyleaflet/leaflet.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -831,11 +831,11 @@ def _updata_data(self, change):
831831
self.data = self._get_data()
832832

833833
def _get_data(self):
834-
values = list(self.gradient.keys())
834+
colormap_labels = list(self.gradient.keys())
835835
colors = list(self.gradient.values())
836-
self.vmin = values[0]
837-
self.vmax = values[-1]
838-
self.colormap = LinearColormap(colors=colors, index=values, vmin=self.vmin, vmax=self.vmax)
836+
self.vmin = colormap_labels[0]
837+
self.vmax = colormap_labels[-1]
838+
self.colormap = LinearColormap(colors=colors, index=colormap_labels, vmin=self.vmin, vmax=self.vmax)
839839

840840

841841
class VectorTileLayer(Layer):

0 commit comments

Comments
 (0)