Comments (8)
Before I try to debug this, this is the idiomatic way to write this:
class Selection(param.Parameterized):
typ = param.ObjectSelector(default='curve', objects=['curve','scatter'])
def callback(self, x, y):
x = 0 if x is None else x
y = 0 if y is None else y
el = hv.Curve if self.typ == 'curve' else hv.Scatter
h = el(((x,0),(y,1)))
return h.redim.range(x=(-1,1), y=(-1,1)).relabel('{},{}'.format(x,y)).options(show_grid=True)
@param.depends('typ')
def view(self):
return hv.DynamicMap(self.callback, streams=[SingleTap(transient=True)])
selection = Selection(name="Ouch")
pn.Column( 'Click on the plot or change plot type', selection.param, selection.view)
from panel.
Thanks for migrating the issue @ea42gh.
from panel.
I modified
https://github.com/ea42gh/HoloviewsPlayground/blob/master/App_EulersMethod.ipynb
as suggested above.
The code works in the notebook as before.
Serving it, the app still breaks once the selector widget is used.
Clicking a legend now appears to call the callback twice,
with some sort of failure on the second time.
I still need to specify that I do not want a tap event when clicking a legend.
if x is not None and y is not None and x < 5.:
I'll go hunt for what else might be going on now...
from panel.
I still need to specify that I do not want a tap event when clicking a legend.
Mind filing another issue in holoviews about this, I hadn't though about the fact that on bokeh server these kinds of guards have to happen on the python end.
from panel.
Also, I can reproduce your issues. Glad I held back on tagging 0.2.
from panel.
Will do.
Figured out a little more:
clicking a legend to mute an element causes
- the plot to be redrawn with the element muted
- redrawing the plot with the element with the original alpha
from panel.
Makes sense, that should be fixed once we drop events outside the plot range on bokeh server.
from panel.
Closing since the remaining issues are in holoviews.
from panel.
Related Issues (20)
- Possible Open Redirect Vulnerability
- Cannot sync Tabulator.value to url - DataFrame is not JSON serializable
- [Build] Minified PlotlyPlot can't be downloaded HOT 2
- Allow panel serve of notebook that starts with magics
- Pyodide Conversion: requirements.txt not able to deal with wheel-urls HOT 2
- Pyodide Conversion: add ability to include resources for the panel app HOT 1
- Pyodide Conversion: Bundle all the necessary ressources to load from a single webserver HOT 1
- MenuButton with custom Panel objects
- Apps on front page have 503 Service Temporarily Unavailable
- Multi-index columns all blank in Tabulator
- Select options not visible when using MaterialTemplate dark theme
- Plotly plots not displayed when Plotly extension loaded after Bokeh's on a website HOT 2
- reacton failed to load in docs
- Make Panel Chat Interface callback not require user and instance args
- Tabulator with frozen_rows scrolling/paging to top when updating content
- In the Reactive HTML doc page, 2 hyperlinks are missing.
- Improve experience for Multifile/Folder Upload
- Can't update message reaction icons after click
- Save layout yields blank html HOT 2
- Deprecation warning in doc page for Accordion layout
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from panel.