Closed amonam closed 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" />
Please have a look here: https://react-native-responsive-linechart.surge.sh/docs/tooltip
You have to pass the theme prop on <Tooltip /> itself
<Tooltip />
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"
/>