Open JamesRamm opened 2 years ago
Suggestion: It would be good to have a section in the README for this hook, with a few working codepen examples.
@govindthakur25 I have added a README section.
@himbeles What is needed to get this merged? Can we go ahead?
Bump Not sure what is needed to get this merged...
@govindthakur25
I have added a README section.
@himbeles
What is needed to get this merged? Can we go ahead?
Just to clarify, I'm not a maintainer of this project.
@nicolaskruchten Do you know who the maintainer of this repo is?
I am just going to put some names of previous committers here in the hope of getting some movement:
@alexcjohnson @nicolaskruchten @bpostlethwaite
Sorry for the spam but it seems there is no-one actively looking at this repo?
@JamesRamm apologies for the silence from us maintainers. This looks great! I'll make a few comments on the code itself, but the one extra thing I'll ask is some basic tests - either add to https://github.com/plotly/react-plotly.js/blob/master/src/__tests__/react-plotly.test.js or put a new file next to it for this purpose. We do have this repo connected to CircleCI https://app.circleci.com/pipelines/github/plotly/react-plotly.js - hopefully the config changes I just made there will enable it to (a) run on this and other forked PRs and (b) show up in the status of this PR 🤞
Y'all... uhhh... gonna merge this?
@alexcjohnson
There are a number of unresolved review comments before we can merge
As discussed in #242 here is a simple hook-based API for react-plotly.
Usage
The hook gives you a
ref
and two streams:updates
andappendData
.Here is an example:
updates
can be treated as a function that you can give partialFigure
definitions to and it will update the graph usingPlotly.react
appendData
can also be used as a function which is directly mapped on toPlotly.extendTraces
every time it is called.Advantages
ref
(#209) which gives you full access to the plotly API (functions/events, throughref.current
)