xanderdeseyn / react-native-responsive-linechart

A customizable and responsive line or area chart for react-native
https://react-native-responsive-linechart.surge.sh
MIT License
202 stars 46 forks source link

Custom Tooltip #57

Closed amonam closed 3 years ago

amonam commented 3 years ago

Could you please provide a simple example for a custom Tooltip. I try this but nothing change. Thank you in advance! <Line initialTooltipIndex={3} hideTooltipOnDragEnd tooltipComponent={} theme={{ Tooltip: { label: { color: "white", fontSize: 22, fontWeight: 300, textAnchor: "middle", opacity: 1, dx: 0, dy: 16.5, }, shape: { width: 30, height: 20, dx: 0, dy: 20, rx: 4, color: "black", }, }, stroke: { color: "white", width: 4, opacity: 0.4, }, scatter: { default: { width: 10, height: 10, rx: 4, color: "white", opacity: 0.8, }, selected: { color: Colors.Primary }, }, }} smoothing="cubic-spline" />

xanderdeseyn commented 3 years ago

Please have a look here: https://react-native-responsive-linechart.surge.sh/docs/tooltip

You have to pass the theme prop on <Tooltip /> itself