react-native-chart-kit icon indicating copy to clipboard operation
react-native-chart-kit copied to clipboard

Format Top of bars

Open fabianmedina09 opened this issue 3 years ago • 12 comments

Is posible to format the labels of the top of bars?

image

fabianmedina09 avatar Dec 08 '20 01:12 fabianmedina09

can you tell us how to show the label on top of bar ?

visheshsprinzo avatar Apr 04 '21 15:04 visheshsprinzo

you can modify it by make change in node_modules . path of file is given below path: node_modules/react-native-chart-kit/dist/barchart.js

sallarahmed avatar Apr 15 '21 09:04 sallarahmed

can someone tell me the how to show label with bargraph scrolling right to left

visheshsprinzo avatar Apr 16 '21 06:04 visheshsprinzo

I need this too.

tavareshenrique avatar May 25 '21 14:05 tavareshenrique

can you tell us how to show the label on top of bar ?

showValuesOnTopOfBars={true} image

MoraesGil avatar Jun 05 '21 02:06 MoraesGil

Screenshot 2021-08-12 at 4 22 17 PM How can I achieve this?

raazatul7 avatar Aug 12 '21 10:08 raazatul7

can you tell us how to show the label on top of bar ?

showValuesOnTopOfBars={true} image

Why not. just pass it as a props showBarTops={false} showValuesOnTopOfBars={true}

shkhaider2015 avatar Feb 11 '22 08:02 shkhaider2015

@shkhaider2015 I have let answer in my own post, but thank u anyway =)

MoraesGil avatar Feb 11 '22 14:02 MoraesGil

Is it possible to add a space (marginBottom) between bar and value?

tanskamalgorzata avatar Feb 21 '22 06:02 tanskamalgorzata

@tanskamalgorzata And anyone else who encounters this issue, I forked this package and added a topBarValueSpacing prop to BarChart to add spacing between the bar and the value above. You can clone it down here

apiel51 avatar Jun 03 '22 23:06 apiel51

i have issues value on top bar, i need format this to font size

LinhLM23496 avatar Oct 25 '22 07:10 LinhLM23496

Hi! @LinhLM23496 @tanskamalgorzata @tavareshenrique @visheshsprinzo

In the chartConfig you can use formatTopBarValue to customise the values on top of bars formatTopBarValue:(e)=> <><Text style={{color:"blue",fontSize:11}}>{e}</Text></>,

abdulhaseeb955 avatar Sep 01 '23 06:09 abdulhaseeb955