https://github.com/ahrefs/melange-recharts
https://github.com/ahrefs/melange-recharts
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ahrefs/melange-recharts
- Owner: ahrefs
- License: mit
- Created: 2018-05-01T14:57:02.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2025-04-02T10:24:37.000Z (about 2 months ago)
- Last Synced: 2025-04-03T00:17:03.749Z (about 2 months ago)
- Language: Reason
- Size: 440 KB
- Stars: 60
- Watchers: 4
- Forks: 27
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGES.md
- License: LICENSE
Awesome Lists containing this project
README
# melange-recharts
These are the [Melange](https://melange.re/) bindings for [Recharts](http://recharts.org/).
🚧 It is not completed, we are adding bindings as we go. Doesn't follow semver at this point. 🚧## Install
Install [opam](https://opam.ocaml.org/) package manager.
Then:
```sh
opam install melange-recharts
```The bindings support the version `^2.15.1` of `recharts` npm package, which should be installed separately:
```json
"dependencies": {
"recharts": "^2.15.1"
}
```## Setup
Add `melange-recharts` to the `libraries` in your `dune` file:
```lisp
; ...
(libraries melange-recharts)
; ...
```## Usage Example
See [Example.re](./example/Example.re);
## Helpers
Some of polymorphic params are represented as a variant, list below:
```reason
module AxisInterval = {
...
type arg =
| PreserveStart
| PreserveEnd
| PreserveStartEnd
| Num(int);
...
};module PxOrPrc = {
...
type arg =
| Px(float)
| Prc(float);
...
};
```you will use it like this:
```reason
```
Check [Recharts documentation](http://recharts.org/en-US/api) for available props.