Skip to content

Commit

Permalink
Support datetimes in bokeh RectanglesPlot (#4461)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Jun 8, 2020
1 parent 98a12ae commit 92109b9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion holoviews/plotting/bokeh/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ def get_data(self, element, ranges, style):
x0, y0, x1, y1 = (element.dimension_values(kd) for kd in inds)
x0, x1 = np.min([x0, x1], axis=0), np.max([x0, x1], axis=0)
y0, y1 = np.min([y0, y1], axis=0), np.max([y0, y1], axis=0)
data = {'x': (x1+x0)/2., 'y': (y1+y0)/2., 'width': x1-x0, 'height': y1-y0}
data = {
'x': x0+(x1-x0)/2.,
'y': x0+(x1-x0)/2.,
'width': x1-x0,
'height': y1-y0
}
mapping = {'x': 'x', 'y': 'y', 'width': 'width', 'height': 'height'}
self._get_hover_data(data, element)
return data, mapping, style

0 comments on commit 92109b9

Please sign in to comment.