indiespirit / react-native-chart-kit

📊React Native Chart Kit: Line Chart, Bezier Line Chart, Progress Ring, Bar chart, Pie chart, Contribution graph (heatmap)
https://expo.io/@indiespirit/react-native-chart-kit
MIT License
2.8k stars 653 forks source link

How to render custom Label in axis and top bar #706

Open skychavda opened 8 months ago

skychavda commented 8 months ago

I use BarChart in my app in which I have to change the top bar label and rerender my own custom labels so I tried formatTopBarValue in chartConfig but this gives me result like below. Which is not I want.

formatTopBarValue: e => (
   <View style={{justifyContent: 'center', alignItems: 'center'}}>
    <Text>{e}</Text>
   <Text>Customer</Text>
  </View>
),
image

I have to make design like this where the top bar and axis are customized. So how can I achieve this kind of design in this package?

image