sqliteviz icon indicating copy to clipboard operation
sqliteviz copied to clipboard

JS errors if new query adds another trace to invisible histogram with Split transform

Open oliver opened this issue 4 years ago • 0 comments

There's a problem which will make the whole plot unresponsive in a (probably very) rare case, due to Javascript errors being thrown:

  • open https://lana-k.github.io/sqliteviz/

  • open both attached test1.csv and test2.csv files (into the same database)

  • import Inquiry from js-bug-try2.json (js-bug.json.gz)

  • run the SQL query (SELECT * FROM "test1") and display the graph. It works fine, and hovering over the two points shows the expected tooltips.

  • change the SQL query to SELECT * FROM "test2", and run it.

    • problem: the graph is not updated; and hovering over the points in the plot shows no tooltips
    • and there are JS errors in console now:
    Uncaught TypeError: N is undefined
    	S hover.js:308
    	hover hover.js:80
    	l throttle.js:48
    	throttle throttle.js:57
    	hover hover.js:77
    	onmousemove graph_interact.js:67
    hover.js:308:29
    
  • in legend, click on the "action1 (trace 0)" graph to make it visible. Result: a new graph for action3 is added, and the graph works again.

This happened with sqliteviz version: 0.15.2 .

Thanks for your work on sqliteviz, it is really useful for me! I've used it so much now that I encounter the really rare edge cases ;-)

oliver avatar Aug 13 '21 11:08 oliver