Check out example codes for "echarts is not defined". It will help you in understanding the concepts better.

Code Example 1

<script src="https://cdnjs.cloudflare.com/ajax/libs/echarts/4.1.0/echarts-en.common.min.js"></script>

Learn ReactJs, React Native from akashmittal.com