react-native-graph
react-native-graph copied to clipboard
feat: graph events
Description
This pull request introduces support for graph events in the application. The main goal is to enhance the user experience by providing the ability to render events in the line graph and highlight important interactions.
To achieve this, the AnimatedLineGraph component accepts four new props events
, EventComponent
, EventTooltipComponent
and onEventHover
.
-
events
is an array of objects that represents each individual interaction and its associated metadata. Each object in this array includes a date
property, which is used to calculate the coordinates of the event on the graph. -
EventComponent
is a component that receives the coordinates and metadata of each event and renders it within the graph. -
EventTooltipComponent
optional element that is rendered when hovering over an EventComponent element. -
onEventHover
is a callback that triggers hovering over anEventComponent
allowing for additional actions.
Demo
https://github.com/margelo/react-native-graph/assets/26143964/e6372ae7-945e-4210-abfa-688fceecfc34
Oh wow, this is pretty cool. CC @chrispader
I'll try to review this during this week! 👍
@chrispader Any progress with the review? 🙏🙂
hey guys, any updates on this?
Will look into this tmrw!