-
-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3316fca
commit b1f921f
Showing
24 changed files
with
863 additions
and
772 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
""" | ||
The models module defines custom bokeh models which extend upon the | ||
functionality that is provided in bokeh by default. The models are | ||
defined as pairs of Python classes and TypeScript models defined in .ts | ||
files. | ||
""" | ||
|
||
from .plots import PlotlyPlot, VegaPlot # noqa | ||
from .widgets import Audio, FileInput, Player # noqa |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
""" | ||
Defines custom bokeh models to render external Javascript based plots. | ||
""" | ||
import os | ||
|
||
from bokeh.core.properties import Dict, String, List, Any, Instance | ||
from bokeh.models import LayoutDOM, ColumnDataSource | ||
|
||
from ..util import CUSTOM_MODELS | ||
|
||
|
||
class PlotlyPlot(LayoutDOM): | ||
""" | ||
A bokeh model that wraps around a plotly plot and renders it inside | ||
a bokeh plot. | ||
""" | ||
|
||
__implementation__ = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'plotly.ts') | ||
|
||
data = Dict(String, Any) | ||
|
||
data_sources = List(Instance(ColumnDataSource)) | ||
|
||
|
||
class VegaPlot(LayoutDOM): | ||
""" | ||
A Bokeh model that wraps around a Vega plot and renders it inside | ||
a Bokeh plot. | ||
""" | ||
|
||
__implementation__ = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'vega.ts') | ||
|
||
data = Dict(String, Any) | ||
|
||
data_sources = Dict(String, Instance(ColumnDataSource)) | ||
|
||
|
||
CUSTOM_MODELS['panel.plotly.PlotlyPlot'] = PlotlyPlot | ||
CUSTOM_MODELS['panel.vega.VegaPlot'] = VegaPlot |
Oops, something went wrong.