capitalone / react-native-pathjs-charts

Android and iOS charts based on react-native-svg and paths-js
Apache License 2.0
879 stars 261 forks source link

Changing default gray background to transparent #185

Closed tokict closed 7 years ago

tokict commented 7 years ago

I dont see any way of changing the background of the chart to transparent. Is this possible?

shrupa commented 7 years ago

You should be able to render the chart inside a view with style element. `

And style definition- const styles = StyleSheet.create({ container: { flex: 0, justifyContent: 'center', alignItems: 'center', backgroundColor: 'transparent', }, }); `

tokict commented 7 years ago

Oh, so it takes it from the parent and if there is no background on the parent it will default to gray. I was somehow expecting it to inherit from main container. Thanks for the tip mate!