GithubHelp home page GithubHelp logo

scala-js-d3v4's Introduction

ScalaJS facade types for D3 version 5

  • Heavily inspired by spaced/scala-js-d3
  • D3 modules are imported automatically by bundler when needed.

Usage

  • Set up Scalajs-Bundler for your project.

  • In your build.sbt:

    resolvers += "jitpack" at "https://jitpack.io"
    libraryDependencies += "com.github.fdietze" % "scala-js-d3v4" % "master-SNAPSHOT"

    When using JitPack, it is often more useful to point to a specific commit, to make your builds reproducible:

    libraryDependencies += "com.github.fdietze" % "scala-js-d3v4" % "08fc8de"

    Like that you can try the latest features from specific commits on master, other branches or PRs.

  • Use d3 like you know it from JavaScript (http://devdocs.io/d3~4):

    import d3v4._
    
    d3.___
  • Contribute missing facades as pull requests. Most of the time this can be done in a few lines of code. You get a good overview of what exists and what is missing when looking at src/main/scala. Each File corresponds to a module in d3: https://devdocs.io/d3~4. To add a new module, simply create a new file and implement the facades you need. Finally add an implicit to your module in D3.scala.

  • Don't hesitate to open new Issues.

Facade writing guidelines

  • 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.

scala-js-d3v4's People

Contributors

cornerman avatar emanresusername avatar fdietze avatar grburst avatar scala-steward avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.