kitware / trame-plotly Goto Github PK
View Code? Open in Web Editor NEWtrame-plotly brings Plotly charts into trame
License: MIT License
trame-plotly brings Plotly charts into trame
License: MIT License
Would be nice if we could bind a callback when the user zooms a plot on the front-end.
Hello, I am a beginner with trame and I am facing an issue with a plotly figure.
When I want to put an element after a plotly figure (for example another plotly figure as shown below), one is hiding the other.
By removing position: absolute;
, it works as I want.
import plotly.graph_objects as go
from trame.widgets import plotly
from trame.app import get_server
from trame.ui.html import DivLayout
fig = go.Figure(
data=go.Contour(
z=[
[10, 10.625, 12.5, 15.625, 20],
[5.625, 6.25, 8.125, 11.25, 15.625],
[2.5, 3.125, 5.0, 8.125, 12.5],
[0.625, 1.25, 3.125, 6.25, 10.625],
[0, 0.625, 2.5, 5.625, 10],
]
)
)
server = get_server(client_type="vue2")
with DivLayout(server) as layout:
plotly.Figure(fig)
plotly.Figure(fig)
if __name__ == "__main__":
server.start()
I see that it comes from vue-components/src/components/TramePlotly.js
template: `<div style="position: relative; width: 100%; height: 100%;" v-bind="$attrs">
<div ref="elem" style="position: absolute; width: 100%; height: 100%;"></div>
</div>`,
Is there a way to manage this option? Or should I use it in a better way?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.