File tree Expand file tree Collapse file tree 1 file changed +26
-23
lines changed Expand file tree Collapse file tree 1 file changed +26
-23
lines changed Original file line number Diff line number Diff line change @@ -159,29 +159,32 @@ const HomeScreen = () => {
159159
160160 < View style = { { alignItems : 'center' } } >
161161 < BarChart
162- data = { { labels, datasets : [ { data } ] } }
163- width = { Math . max ( width , labels . length * 60 ) }
164- height = { 220 }
165- fromZero
166- showValuesOnTopOfBars
167- withInnerLines = { true }
168- withHorizontalLabels = { false } // Hide Y-axis labels only
169- chartConfig = { {
170- backgroundGradientFrom : '#fff' ,
171- backgroundGradientTo : '#fff' ,
172- color : ( ) => '#70A1FF' ,
173- decimalPlaces : 0 ,
174- barPercentage : 0.6 ,
175- propsForBackgroundLines : {
176- stroke : '#E0E0E0' ,
177- } ,
178- formatYLabel : ( yValue ) => `${ yValue } m` ,
179- } }
180- style = { {
181- marginVertical : 8 ,
182- borderRadius : 16 ,
183- } }
184- />
162+ data = { { labels, datasets : [ { data } ] } }
163+ width = { width + 100 }
164+ height = { 220 }
165+ fromZero
166+ showValuesOnTopOfBars
167+ withInnerLines = { true }
168+ withHorizontalLabels = { false }
169+ chartConfig = { {
170+ backgroundGradientFrom : '#fff' ,
171+ backgroundGradientTo : '#fff' ,
172+ decimalPlaces : 0 ,
173+ barPercentage : 0.6 ,
174+ fillShadowGradient : '#70A1FF' , // actual bar color
175+ fillShadowGradientOpacity : 1 , // make sure it's visible
176+ color : ( ) => '#70A1FF' , // label/text color
177+ propsForBackgroundLines : {
178+ stroke : '#E0E0E0' ,
179+ strokeDasharray : '' , // solid line
180+ } ,
181+ } }
182+ style = { {
183+ marginVertical : 8 ,
184+ borderRadius : 16 ,
185+ } }
186+ />
187+
185188</ View >
186189
187190
You can’t perform that action at this time.
0 commit comments