GithubHelp home page GithubHelp logo

trame-plotly's Issues

Plots on top of each other with `position: absolute;`

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.