ahrefs/melange-recharts

61

stars

178

commits

Reason

primary language

Nov 1, 2025

updated

README

melange-recharts

These are the Melange bindings for Recharts. 🚧 It is not completed, we are adding bindings as we go. Doesn't follow semver at this point. 🚧

Install

Install opam package manager.

Then:

opam install melange-recharts

The bindings support the version ^2.15.1 of recharts npm package, which should be installed separately:

  "dependencies": {
    "recharts": "^2.15.1"
  }

Setup

Add melange-recharts to the libraries in your dune file:

; ...
  (libraries melange-recharts)
; ...

Usage Example

See Example.re;

Helpers

Some of polymorphic params are represented as a variant, list below:

module AxisInterval = {
  ...
  type arg =
    | PreserveStart
    | PreserveEnd
    | PreserveStartEnd
    | Num(int);
  ...
};

module PxOrPrc = {
  ...
  type arg =
    | Px(float)
    | Prc(float);
  ...
};

you will use it like this:

<XAxis
  interval=PreserveStart
/>
<XAxis
  interval=Num(12)
/>

Check Recharts documentation for available props.

Contributors

liubko

92 commits

johnhaley81

15 commits

dependabot[bot]

15 commits

bryanthomaschen

13 commits

ahrefs/melange-recharts

61

stars

178

commits

Reason

primary language

Nov 1, 2025

updated

README

melange-recharts

These are the Melange bindings for Recharts. 🚧 It is not completed, we are adding bindings as we go. Doesn't follow semver at this point. 🚧

Install

Install opam package manager.

Then:

opam install melange-recharts

The bindings support the version ^2.15.1 of recharts npm package, which should be installed separately:

  "dependencies": {
    "recharts": "^2.15.1"
  }

Setup

Add melange-recharts to the libraries in your dune file:

; ...
  (libraries melange-recharts)
; ...

Usage Example

See Example.re;

Helpers

Some of polymorphic params are represented as a variant, list below:

module AxisInterval = {
  ...
  type arg =
    | PreserveStart
    | PreserveEnd
    | PreserveStartEnd
    | Num(int);
  ...
};

module PxOrPrc = {
  ...
  type arg =
    | Px(float)
    | Prc(float);
  ...
};

you will use it like this:

<XAxis
  interval=PreserveStart
/>
<XAxis
  interval=Num(12)
/>

Check Recharts documentation for available props.

Contributors

liubko

92 commits

johnhaley81

15 commits

dependabot[bot]

15 commits

bryanthomaschen

13 commits

Languages

Reason

93.0%

HTML

3.5%

Makefile

2.6%