package melange-recharts
Melange bindings for recharts
Install
Dune Dependency
Authors
Maintainers
Sources
melange-recharts-4.0.3.tbz
sha256=1295e56c252d53ca85bf814404e4bc40b02ba095b33cd48cd1b44d05514bae0c
sha512=a204b818dbc3e01dd4e8ceacabc70221844592b2e7163dfc7375051b921253285a38cf502e7c2cd8c613d04ceee9270408e572b43bdae4988fc164c35adec933
Description
Melange bindings for recharts JavaScript library.
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.1.12
of recharts
npm package, which should be installed separately:
"dependencies": {
"recharts": "^2.1.12"
}
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);
...
};
module StrOrNode = {
...
type arg =
| Str(string)
| Node(ReasonReact.reactElement);
...
};
you will use it like this:
<XAxis
interval=PreserveStart
label=Str("text")
/>
<XAxis
interval=Num(12)
label=Node(
<span>
(ReasonReact.stringToElement("text"))
</span>
)
/>
Check Recharts documentation for available props.
Dependencies (6)
-
reason-react-ppx
>= "0.14.0"
-
reason-react
>= "0.14.0"
-
reason
>= "3.10.0"
-
melange
>= "3.0.0"
- ocaml
-
dune
>= "3.8"
Dev Dependencies (1)
-
odoc
with-doc
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page