Closed ThePolyBlank closed 2 months ago
Your issue is with using this
inside of a view, which behaves the same as a function, where the this
object is not the same as the one given to the dataviewjs
block, causing it to be unable to read this.container
the fix is simply change your call to dv.view(scriptname, this)
and change the code in the script file to use input.container
.
this will pass in the dataviewjs
's this into the script as a variable called input
so that is can get the container
from it
Describe the bug
When putting graph code in a js file and loading it with dv.view("scriptname"), the graph does not generate when it should.
Relevant errors (if available)
No response
Steps to reproduce
Expected Behavior
The graph shows up
Additional context
the same behavior accours when using eval()
Code
Operating system
Windows