@ahrefs/bs-highcharts

Bucklescript bindings for Highcharts

Usage no npm install needed!

<script type="module">
  import ahrefsBsHighcharts from 'https://cdn.skypack.dev/@ahrefs/bs-highcharts';
</script>

README

bs-highcharts

These are Bucklescript bindings for highcharts. 🚧 They are not complete. Types can change in a backwards incompatible way between minor versions. 🚧

Install

yarn add @ahrefs/bs-highcharts

Setup

Add bs-highcharts to bs-dependencies in your bsconfig.json.

{
  /* ... */
  "bs-dependencies": [
    "@ahrefs/bs-highcharts"
  ],
  /* ... */
}

Usage Example

open Highcharts;

let options =
  Options.(
    make(
      ~title=Title.make(~text="My chart", ()),
      ~series=[|Series.line(~data=[|1, 2, 3|], ())|],
      (),
    )
  );

Highcharts.chart("container", options);

Check Highcharts API documentation for available props in the original JavaScript library. Several options might not be available in these bindings, PRs welcome!