Created
April 14, 2017 08:11
-
-
Save JaimeEnergy/1f72842d1fc0c168cebb59bfd6acb0fe to your computer and use it in GitHub Desktop.
Bokeh Gantt Chart: Use CustomJS to prevent vertical scrolling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bokeh.models.callbacks import CustomJS | |
jscode=""" | |
range.set('start', parseInt(%s)); | |
range.set('end', parseInt(%s)); | |
""" | |
yrange = subplot.y_range | |
yrange.start, yrange.end = 0, plot_height | |
subplot.y_range.callback = CustomJS( | |
args = dict(range = yrange), | |
code = jscode % (yrange.start, yrange.end) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment