react-native-graph icon indicating copy to clipboard operation
react-native-graph copied to clipboard

feat: graph events

Open PeKne opened this issue 1 year ago • 5 comments

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 an EventComponent allowing for additional actions.

Demo

https://github.com/margelo/react-native-graph/assets/26143964/e6372ae7-945e-4210-abfa-688fceecfc34

PeKne avatar Jul 17 '23 05:07 PeKne

Oh wow, this is pretty cool. CC @chrispader

mrousavy avatar Sep 19 '23 08:09 mrousavy

I'll try to review this during this week! 👍

chrispader avatar Sep 19 '23 11:09 chrispader

@chrispader Any progress with the review? 🙏🙂

PeKne avatar Oct 30 '23 08:10 PeKne

hey guys, any updates on this?

ikryvorotenko avatar Nov 29 '23 09:11 ikryvorotenko

Will look into this tmrw!

chrispader avatar Apr 15 '24 18:04 chrispader