Skip to content

Commit

Permalink
Fix hover for stacked bars (#4892)
Browse files Browse the repository at this point in the history
  • Loading branch information
brl0 committed Apr 21, 2021
1 parent 98d4512 commit 3ad8387
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions holoviews/plotting/bokeh/chart.py
Expand Up @@ -695,7 +695,7 @@ class SpikesPlot(SpikesMixin, ColorbarPlot):

selection_display = BokehOverlaySelectionDisplay()

style_opts = base_properties + line_properties + ['cmap', 'palette']
style_opts = base_properties + line_properties + ['cmap', 'palette']

_nonvectorized_styles = base_properties + ['cmap']
_plot_methods = dict(single='segment')
Expand Down Expand Up @@ -994,7 +994,10 @@ def get_data(self, element, ranges, style):
data['top'].append(ts)
data[xdim.name].append(xs)
data[stack_dim.name].append(slc_ds.dimension_values(stack_dim))
if hover: data[ydim.name].append(ys)
if hover:
data[ydim.name].append(ys)
for vd in slc_ds.vdims[1:]:
data[vd.name].append(slc_ds.dimension_values(vd))
if not style_mapping:
self._add_color_data(slc_ds, ranges, style, cdim, data,
mapping, factors, colors)
Expand All @@ -1013,7 +1016,7 @@ def get_data(self, element, ranges, style):
data[xdim.name].append(ds.dimension_values(xdim))
data[ydim.name].append(ds.dimension_values(ydim))

if hover:
if hover and grouping != 'stacked':
for vd in ds.vdims[1:]:
data[vd.name].append(ds.dimension_values(vd))

Expand Down

0 comments on commit 3ad8387

Please sign in to comment.