Open norweeg opened 3 years ago
So the problem here is that Bars is not a continuous plot, it plots a discrete set of categories, which means it never even looks at the Dimension.range
instead using the discrete Dimension.values
. This is something we're hoping to address but for now I can only recommend using a type that does support a continuous scale such as the Histogram
type (badly named I know).
I worked around it by rediming it to discrete values. I just expected that discrete values in a range would imply only values within that range. Took me a minute to figure that out though. Do the docs have anything about this behavior? I get that the bars are not a continuous plot, but my dim was originally continuous before I aggregated into years, and I just assumed that the bins within the range would be displayed
When plotting a bar chart, either directly or using a
.to
method, the plot does not obey the range of its kdim, even when other plot types do. In the code example below, the bar charts will show years 2003-2016 despite having their kdim range set to 2004-2015. The curve plots of the exact same data show the correct kdim range. As far as I can tell, only bar charts have this issue.python=3.8.5 holoviews=1.13.3 jupyter=1.0.0 bokeh=2.1.1
example showing bug: