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 opam package manager.
Then:
opam install melange-rechartsThe bindings support the version ^2.15.1 of recharts npm package, which should be installed separately:
"dependencies": {
"recharts": "^2.15.1"
}Add melange-recharts to the libraries in your dune file:
; ...
(libraries melange-recharts)
; ...See Example.re;
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.