Echarts is a chart plugin that can be used to make some charts
such as: Line chart
and a bar chart.
We sometimes use charts to show the data in our work.
Let's learn to learn echarts this chart plugin ^_^
First step: Download the plugin Package
: http://echarts.baidu.com/index.html
Once downloaded, we'll be ready to start using this plugin.
Step Two: Create an HTML document and introduce the plugin's file
Step three: Create the container and set the height
Fourth step: Create a script to write the JS code
Fifth Step: Configure the path of the package (because you will need to set the path before you use the contents of the package)
Now you don't need to know the meaning of each function, just know that this code is used to set the path, because the files in dist are used later
Sixth step: Start production
Write a require ({}) First, and write the code inside.
Seventh step: Using the chart type file, we now do the histogram, we need to introduce the bar file
Eighth step: Initialize the container
Nineth Step: Initialize the contents of the chart
Tenth step: Whether to open the Bubble prompt box
11th Step: Whether data and graphics are associated
12th step: X-axis data
13th Step: Y-axis data
14th Step: Show the data
15th Step: Load data for the container
Show results
Add the code to the head.
All right, bar chart. ^_^
If you want to display it as a line chart, change the bar to lines, and change it in two places.
The line chart is coming out. ^_^, good use of it, to the other display is the same
There are other pictures, you can go to the official website http://echarts.baidu.com/index.html Learn more
Line chart: Lines
Bar chart: Bar
Scatter chart: Scatter
Candlestick Chart: K pie chart: Pie Radar: Radar chord graph: chord Force-guided layout: forces
Maps: Map Dashboard: Gauge Funnel chart: Funnel event river diagram: Eventriver Well, I hope you can use Echarts to make a chart, ^_^
Echarts Creating a chart