Skip to content

Commit

Permalink
Merge pull request #63 from ahrefs/fix-tick-props
Browse files Browse the repository at this point in the history
Fix tick props
  • Loading branch information
bryanthomaschen authored Dec 9, 2024
2 parents 36bf79a + f601b26 commit 7b02a74
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.0.3

- fix tick props in `XAxis`, `YAxis` and `ZAxis`

## 5.0.2

- change Tooltip.cursor Obj type to open object type
Expand Down
2 changes: 1 addition & 1 deletion src/XAxis.re
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ external make:
| `Obj(Js.t({..}))
| `Element(React.element)
| `Bool(bool)
| `Fn('tick => React.element)
| `Fn('tickProps => React.element)
]
=?,
~tickCount: int=?,
Expand Down
10 changes: 9 additions & 1 deletion src/YAxis.re
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
// http://recharts.org/en-US/api/YAxis
open Utils;

type tickArgs = {
index: int,
payload: option({. "value": float}),
visibleTicksCount: int,
x: int,
y: int,
};

[@mel.module "recharts"] [@react.component]
external make:
(
Expand Down Expand Up @@ -54,7 +62,7 @@ external make:
| `Obj(Js.t({..}))
| `Element(React.element)
| `Bool(bool)
| `Fn('tick => React.element)
| `Fn('tickProps => React.element)
]
=?,
~tickCount: int=?,
Expand Down
2 changes: 1 addition & 1 deletion src/ZAxis.re
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ external make:
| `Obj(Js.t({..}))
| `Element(React.element)
| `Bool(bool)
| `Fn('tick => React.element)
| `Fn('tickProps => React.element)
]
=?,
~tickCount: int=?,
Expand Down

0 comments on commit 7b02a74

Please sign in to comment.