Skip to content

Commit

Permalink
Merge pull request #1 from justinzhu17/patch-delete-heatmap-data
Browse files Browse the repository at this point in the history
Implementation of Feature Request plotly#2802
  • Loading branch information
justinzhu17 committed Apr 22, 2024
2 parents 0d96c02 + 76e3d09 commit 3929276
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions dash/_patch.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,13 @@ def update(self, E=None, **F):
value.update(F)
self._operations.append(_operation("Merge", self._location, value=value))

def delHeat(self, index = 0, length = 0):
"""Deletes the item at index in a Heat figure, length of the 'z' 2D array is necessary"""
del self['data'][0]['x'][index]
del self['data'][0]['y'][index]
for i in range(length):
del self['data'][0]['z'][i][index]

# pylint: disable=no-self-use
def sort(self):
raise KeyError(
Expand Down

0 comments on commit 3929276

Please sign in to comment.