- Heavily inspired by spaced/scala-js-d3
- D3 modules are imported automatically by bundler when needed.
-
Set up Scalajs-Bundler for your project.
-
In your
build.sbt
:libraryDependencies += "com.github.fdietze" %%% "scala-js-d3v4" % "0.1.0-SNAPSHOT"
-
Use d3 like you know it from JavaScript (http://devdocs.io/d3~4):
import org.scalajs.d3v4._ d3.___
-
Contribute missing facades as pull requests.
-
Don't hesitate to open new Issues.
- Ref types involving null don't need a union type with Null. Provide wrapper methods mapping to Option.
- Prefer overloading in most cases. But use union types to avoid combinatorial explosion.