Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support loader.js from gstatic.cn #730

Closed
1 task
51yu opened this issue Sep 26, 2024 · 1 comment · Fixed by freddycoder/budget-forecast#64
Closed
1 task

support loader.js from gstatic.cn #730

51yu opened this issue Sep 26, 2024 · 1 comment · Fixed by freddycoder/budget-forecast#64

Comments

@51yu
Copy link

51yu commented Sep 26, 2024

Would you like to work on this feature?

  • Check this if you would like to implement a PR, we are more than happy to help you go through the process.

What problem are you trying to solve?

gstatic.com is extremely slow from mainland China, using gstatic.cn is way much faster
you can compare the speed using https://www.dotcom-tools.com/china-firewall-test
https://www.gstatic.cn/charts/loader.js => less than 1 second
https://www.gstatic.com/charts/loader.js => at least 50 seconds

Describe the solution you'd like

on line https://github.com/rakannimer/react-google-charts/blob/master/src/hooks/useLoadGoogleCharts.ts#L31
provide option to developer to choose either get loader.js from

https://www.gstatic.com/charts/loader.js

or

https://www.gstatic.cn/charts/loader.js

Describe alternatives you've considered

No response

Documentation, Adoption, Migration Strategy

No response

@rakannimer
Copy link
Owner

Hey @51yu,

Thank you for the suggestion, I added support for changing the URL for this loader:

chartLoaderScriptUrl

You can try it out in 5.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants