question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we add a *strict* (or *debug*) mode that runs `Plotly.validate` on every `newPlot` and `update` call before attempting to draw?

See original GitHub issue

which would essentially be a more general way to resolve https://github.com/plotly/plotly.js/pull/1736

I’m thinking this strict/debug mode would be set as a config argument. We could either log the attribute errors (as Plotly.validate currently does) or throw an error.

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
etpinardcommented, Sep 13, 2017

Is there a sense of what type of performance hit this would involve?

At the moment, Plotly.validate is fairly fast. It clocks in at no worse than 50ms. Plotly.validate’s execution time, in its current state, scales with the number of "data" and "layout" attributes set.

That said, if we choose to implement https://github.com/plotly/plotly.js/issues/1998, Plotly.validate will likely slow down a little bit. It we only check for data arrays lengths, the performance hit will be small. But if we choose to check for invalid data items (e.g. null in scatter marker traces), this will make Plotly.validate’s execution time scale with the length of the data array - which will slow it down considerably for graphs with many data points.

1reaction
etpinardcommented, Sep 27, 2018

cc @phxnsharp if you weren’t aware of this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Function reference in JavaScript - Plotly
Draws a new plot in an <div> element, overwriting any existing plot. To update an existing plot in a <div> , it is...
Read more >
Dash User Guide and Documentation
app.run_server(debug=True) . This means that Dash will automatically refresh your browser when you make a change in your code. Give it a try:...
Read more >
rms: Regression Modeling Strategies - R Project
You can use if(!exists(.Random.seed)) runif(1) before running your bootstrap to make sure that .Random.seed will be available to bootBCa.
Read more >
Release 7.27.0 The IPython Development Team
Transformers are usually called many time; typically: • When trying to figure out whether the code is complete and valid (should we insert...
Read more >
EasyBuild v4.6.2 documentation (release 20221021.0)
enhance OpenBLAS easyblock to support running LAPACK test suite + checking how many tests fail (#2801); make numexpr easyblock aware of toolchain with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found