Hi all! I’m attempting to do some data viz with d3.js + pyRevit, but running into a couple hiccups. I got the idea by stumbling on the example here, which I realize is a few years old. Originally the reference in the html file (line 20):
<script src="https://unpkg.com/d3"></script>, wasn’t working for me. I then downloaded the d3 js file and pointed to it like this:
This worked, though for some reason d3.v6.js wouldn’t work, but I can probably live with that for now.
I tried importing the d3.v4.js file as a module into the js file directly like so:
import * as d3 from './d3.v4.js';
However this throws a Syntax error for some reason.
Would be curious to hear if anyone has successfully done this / knows what I’m doing wrong. Perhaps there’s a reason the example was not broken out into separate .js files as would normally be done?
Hope this generally makes sense. Thanks all in advance!