⚠️ Oops! This page doesn't appear to define a type called _.

Build Status

bs-d3

WIP d3 5.x bindings for Bucklescript.

Extremely incomplete and experimental; contributions welcome!

print_endline("yolo!");
[@@@ocaml.ppx.context { cookies = [] }]
let _ = print_endline (("yolo!")[@reason.raw_literal "yolo!"])

Setting up a dev environment

# Install dependencies
yarn

# Start bucklescript in watch mode
yarn start

# In a separate terminal window, run webpack
yarn webpack

# Then open `./examples/index.html` and you should the line chart from `./examples/lineChart.re`

Current status

d3 has a large API surface, so there's still a lot to do! However, the pieces are already in place to draw line and area charts

Currently some of the typings are still quite loose/permissive, if you have any suggestions to tighten them up in an idiomatic OCaml way, please file an issue or PR.