Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make dependency optional #792

Merged
merged 1 commit into from
Jul 25, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 13 additions & 5 deletions holoviews/plotting/bokeh/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@
ErrorBars, Text, HLine, VLine, Spline, Spikes,
Table, ItemTable, Area, HSV, QuadMesh, GridImage)
from ...core.options import Options, Cycle
from ...interface import DFrame

try:
from ...interface import DFrame
except:
DFrame = None

from ..plot import PlotSelector

from .annotation import TextPlot, LineAnnotationPlot, SplinePlot
Expand All @@ -26,7 +31,7 @@

Store.renderers['bokeh'] = BokehRenderer.instance()

Store.register({Overlay: OverlayPlot,
associations = {Overlay: OverlayPlot,
NdOverlay: OverlayPlot,
GridSpace: GridPlot,
GridMatrix: GridPlot,
Expand Down Expand Up @@ -71,8 +76,12 @@
# Tabular
Table: TablePlot,
ItemTable: TablePlot,
DFrame: TablePlot,
NdElement: TablePlot},
NdElement: TablePlot}

if DFrame is not None:
associations[DFrame] = TablePlot

Store.register(associations,
'bokeh')


Expand Down Expand Up @@ -140,4 +149,3 @@
# Annotations
options.HLine = Options('style', line_color='black', line_width=3, line_alpha=1)
options.VLine = Options('style', line_color='black', line_width=3, line_alpha=1)