[Python] Clickable link (hyperref) in a plotly table without the use of dash

Discussão em 'Python' iniciado por Stack, Dezembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    Is there a way to create a clickable link in a plotly table without using dash?

    The following code shows the links but they are not clickable.

    import plotly.graph_objects as go
    import pandas as pd

    data = {
    'Link': ['<a href="https://www.google.com>Google</a>', '<a href="https://www.youtube.com>YouTube</a>'],
    'Name': ['Google', 'YouTube'],
    }
    data = pd.DataFrame(data)
    fig = go.Figure(data=[go.Table(
    header=dict(values=['Link', 'Name']),
    cells=dict(values=[data['Link'], data['Name']])
    )])
    fig.show()

    Continue reading...

Compartilhe esta Página