tomLadder / react-native-echarts-wrapper

πŸ“ˆPowerful React-Native ECharts Wrapper πŸ“Š
MIT License
177 stars 62 forks source link

Loading state/Background Color #17

Closed masiamj closed 5 years ago

masiamj commented 5 years ago

Hey @tomLadder, first off, awesome library! Love using it, and it's been a huge help.

I'm curious how you handle loading states before the chart actually renders? I'm having a tough time with it right now and was wondering if we (happy to put in a PR) could implement a loading-type callback or be able to change the background color (on html, body, or main pre-render via props.

Let me know, happy to contribute!

tomLadder commented 5 years ago

Hey @masiamj ! Thanks for very much for your feedback πŸ™

First of all, I forgot to add the onLoadEnd callback to the documentation. It fires when the WebView finished loading the echarts framework.

The feature request to set a custom background color totally makes sense πŸ‘ Probably the easiest and most efficient solution would be to inject a custom javascript function which sets the background color with some DOM Manipulation. The background-color could be a property of the ECharts component. When the WebView finished the loading (onLoadEnd) of the local files you could check if there is a custom color set with a property and then call the injected javascript function to set it.

Cheers Tom

ty-sang commented 5 years ago

Nice Library, and thanks for all the supports!

May I ask about the timeline for this request? I'm trying to change background color and match design. Thank again!

tomLadder commented 5 years ago

Hey @shieer. Gonna have a look at it tomorrow.

Cheers Tom

tomLadder commented 5 years ago

Just released v1.4.5 πŸŽ‰. Adds backgroundColor support.

ty-sang commented 5 years ago

@tomLadder Just wanna say thank you! I'm new to React Native, and I like to improve this wrapper along I'm using it. Thanks a lot!

tomLadder commented 5 years ago

@shieer Thank you! Your welcome to send some nice pull requests :)

namcu1998 commented 1 year ago

Can the background color is transparent? and where can I edit text color? Thanks