Skip to content
Chart.js bindings for OCaml
OCaml Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
lib
plugins
.gitignore
.ocamlformat
.ocp-indent
CHANGES.md
LICENSE.md
Makefile
README.md
TODO.md
chartjs-annotation.opam
chartjs-colorschemes.opam
chartjs-datalabels.opam
chartjs-streaming.opam
chartjs.opam
dune-project

README.md

chartjs-ocaml: OCaml bindings for Chart.js

This library provides OCaml bindings for the Chart.js charting library and some popular plugins.

Following chart types are currently supported:

  • Line
  • Bar
  • Horizontal bar
  • Pie
  • Doughnut

Installation

Opam

Install the library and its dependencies via OPAM

opam install chartjs

Manual

dune build @install
dune install

Usage

Please notice that chartjs-ocaml just provides bindings for the Chart.js library and its most popular plugins, so be sure to include corresponding javascript files to your web application, like:

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/chart.js@2.8.0"></script>

Basic usage examples can be found in the examples directory.

Contents of the distribution

Filename Description
README this file
LICENSE license and copyright notice
lib/ bindings for the Chart.js core library
plugins/streaming bindings for the chartjs-plugin-streaming
plugins/datalabels bindings for the chartjs-plugin-datalabels
plugins/annotation bindings for the chartjs-plugin-annotation
plugins/colorschemes bindings for the chartjs-plugin-colorschemes
examples/ basic library usage examples
You can’t perform that action at this time.