This package has been deprecated

Author message:

move to @ahrefs/bs-recharts

bs-recharts

0.0.3 • Public • Published

bs-recharts

This is Bucklescript bindings for Recharts. It is not completed, we are adding bindings as we go.

Install

yarn add bs-recharts

Setup

Add bs-recharts to bs-depenencies in your bs-config. bs!

{
  /* ... */
  "bs-dependencies": [
    "bs-recharts"
  ],
  /* ... */
}

Usage Example

open BsRecharts;

let component = ReasonReact.statelessComponent("SomeComponent");

let make = (_children) => {
  ...component,

  render: (data, _self) => {
    <ResponsiveContainer height=200>
      <BarChart
        barCategoryGap=0.5
        margin={"top": 0, "right": 0, "bottom": 0, "left": 0}
        data=data>
        <Bar
          name="Some bar"
          dataKey="key1"
          fill="#2078b4"
          stackId="a"
        />
        <Bar
          name="Other bar"
          dataKey="key2"
          fill="#ff7f02"
          stackId="a"
        />
        <Tooltip />
        <Legend align="left" iconType="circle" />
      </BarChart>
    </ResponsiveContainer>
  }
};

Check Reacharts documentation for available props.

Package Sidebar

Install

npm i bs-recharts

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

20.7 kB

Total Files

16

Last publish

Collaborators

  • rustykey