Skip to content

python Scatter uid different from the data uid in .js #1635

Closed
@Mendes11

Description

@Mendes11

Hi,

I’m currently creating an app that has a graph with stream update using extendTrace function.
The app creates multiples Scatters in python and then send the plot to a HTML page.

Since this app can graph N scatters, acconding to the variables the user adds. I need to identify each one in the .JS so I can update it.

So to identify each scatter, I add an uid to it:

scatters.append(go.Scatter(
        uid=f'{equipment_uuid}',
        x=input_df['timestamp'].tolist(),
        y=input_df['value'].tolist(),
        name=f'{equipment.name} - {input_name}',
    ))

I though it was enough to identify it in the JS but when I get the element with:

document.getElementById('graph').data
it lists all the graphs, but the uid is different from the one I setted in the python Scatter class…

Am I doing something wrong or is this a bug? Is there any other way to identify each scatter (except by the name which I don’t trust to use as a unique identifier)

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions