Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[question] Is there a way to use plotly events with the chart editor #971

Open
Darruma opened this issue Oct 7, 2019 · 1 comment
Open

Comments

@Darruma
Copy link

Darruma commented Oct 7, 2019

Is there a way to use plotly events with the component like
in https://plot.ly/javascript/plotlyjs-events/

<PlotlyEditor
            plotly={plotly}
            onClick={(data) => console.log(data)}
            data={this.props.data}
            layout={this.props.layout}
            onUpdate={this.props.updateEditor}
            frames={this.props.frames}
            hideControls={this.state.controls}
            dataSources={{}}
            dataSourcesOptions={{}}
/>

I would like to be able to handle the event when a line is clicked on the chart editor.
This seems possible using the react plotly library
with event handler props.

@nicolaskruchten
Copy link
Contributor

There's no way to do this with PlotlyEditor but if you go one level inwards, you can control how EditorControls and Plot interact and attach whatever handlers you like therein :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants