Skip to content

Instantly share code, notes, and snippets.

@danderson00
Created June 14, 2017 19:00
Show Gist options
  • Save danderson00/95eb1859e66fe1cfe9104735f3214915 to your computer and use it in GitHub Desktop.
Save danderson00/95eb1859e66fe1cfe9104735f3214915 to your computer and use it in GitHub Desktop.
renderGraph = filter => {
this.setState({ filter })
this.worker.topTenMovers(filter)
.then(data => Plotly.newPlot(this.element, [data]))
// ignore any dropped packets
// we need to handle any errors coming out of the worker here
.catch(error => error.dropped || console.error(error))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment