How to adjust the gap between the bar and the tooltip #929
Unanswered
Narendra180
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
` <BarChart
data={[
{ value: 60, frontColor: "#FFDFA3", label: "Jun" },
{ value: 85, frontColor: "#87FFBE", label: "Jul" },
{ value: 60, frontColor: "#FFDFA3", label: "Aug" },
{ value: 30, frontColor: "#FFA5A5", label: "Sep" },
{ value: 55, frontColor: "#FFDFA3", label: "Oct" },
{ value: 55, frontColor: "#FFDFA3", label: "Nov" },
{ value: 80, frontColor: "#1BC469", label: "Dec", topLabelComponent: () => <PoppinsText numberOfLines={1} style={{ fontSize: 14, width: 100, textAlign: "center" }}>80% },
]}
height={200}
width={window.width - 32}
minHeight={3}
barBorderRadius={5}
spacing={20}
noOfSections={5}
yAxisThickness={0}
xAxisThickness={0}
backgroundColor={"white"}
hideYAxisText
activeOpacity={0.8}
barWidth={25}
maxValue={100}
renderTooltip={(item, index) => {
return (
<View
style={{
marginBottom: 20,
marginLeft: -6,
backgroundColor: '#ffcefe',
paddingHorizontal: 6,
paddingVertical: 4,
borderRadius: 4,
}}>
{item.value}
);
}}
Beta Was this translation helpful? Give feedback.
All reactions