当前位置:网站首页>Basic implementation of pie chart
Basic implementation of pie chart
2022-07-08 01:11:00 【Just love life】

Implementation steps
ECharts The most basic code structure :
introduce js file ,DOM Containers , Initialize object , Set up option
Data preparation :[{name:??,value:??},{},{}]
TaoBao :12111 JD.COM :23322 Vipshop :33223 Jumei.com :67899 1 Number point :1223
take type Is set to type

<!-- ECharts The most basic code structure : 1. introduce js file ,DOM Containers , Initialize object , Set up option 2. Data preparation :[{
name:??,value:??},{
},{
}] 3. TaoBao :12111 JD.COM :23322 Vipshop :33223 Jumei.com :67899 1 Number point :1223 4. take type Is set to type --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <!-- step 1: introduce echarts.js file --> <script src="lib/echarts.min.js"></script> </head> <body> <!-- step 2: Prepare a box to present the chart --> <div style="width: 600px;height: 400px;"></div> <script> // step 3: initialization echarts Instance object // Parameters ,dom, Decide where the icon will eventually appear var mCharts= echarts.init(document.querySelector('div')) // step 4: Prepare the data TaoBao :12111 JD.COM :23322 Vipshop :33223 Jumei.com :67899 1 Number point :1223 var pieData=[
{
name:' TaoBao ',
value:12111
},
{
name:' JD.COM ',
value :23322
},
{
name:' Vipshop ',
value:33223
},
{
name:' Jumei.com ',
value:67899
},
{
name:'1 Shop No. ',
value:1223
}
] // step 5: Prepare configuration items var option={
series:[
{
name:' shopping ',
type:'pie', //bar It's a histogram ,line It's linear ,pie It's pie shaped
data:pieData
}
]
}
// step 5: Set the configuration item to echarts Instance object
mCharts.setOption(option)
</script>
</body>
</html>
边栏推荐
- CVE-2022-28346:Django SQL注入漏洞
- 12.RNN应用于手写数字识别
- EDP to LVDS conversion design circuit | EDP to LVDS adapter board circuit | capstone/cs5211 chip circuit schematic reference
- Parade ps8625 | replace ps8625 | EDP to LVDS screen adapter or screen drive board
- 50MHz generation time
- Analysis of 8 classic C language pointer written test questions
- Introduction to paddle - using lenet to realize image classification method II in MNIST
- 1. Linear regression
- NVIDIA Jetson test installation yolox process record
- Binder core API
猜你喜欢

Taiwan Xinchuang sss1700 latest Chinese specification | sss1700 latest Chinese specification | sss1700datasheet Chinese explanation

AI遮天传 ML-回归分析入门

9. Introduction to convolutional neural network

基于人脸识别实现课堂抬头率检测

How to write mark down on vscode

5.过拟合,dropout,正则化

13.模型的保存和載入

How to transfer Netease cloud music /qq music to Apple Music

NVIDIA Jetson test installation yolox process record

Two methods for full screen adaptation of background pictures, background size: cover; Or (background size: 100% 100%;)
随机推荐
SDNU_ ACM_ ICPC_ 2022_ Summer_ Practice(1~2)
Saving and reading of network model
Design method and application of ag9311maq and ag9311mcq in USB type-C docking station or converter
A network composed of three convolution layers completes the image classification task of cifar10 data set
New library online | cnopendata China Star Hotel data
[reprint] solve the problem that CONDA installs pytorch too slowly
Introduction to ML regression analysis of AI zhetianchuan
Mathematical modeling -- knowledge map
Marubeni official website applet configuration tutorial is coming (with detailed steps)
Ag9310 design USB type C to hdmi+u2+5v slow charging scheme design | ag9310 expansion dock scheme circuit | type-C dongle design data
Get started quickly using the local testing tool postman
基于人脸识别实现课堂抬头率检测
Share a latex online editor | with latex common templates
Chapter IV decision tree
基础篇——整合第三方技术
Definition and classification of energy
2. Nonlinear regression
[go record] start go language from scratch -- make an oscilloscope with go language (I) go language foundation
10.CNN应用于手写数字识别
Ag9311maq design 100W USB type C docking station data | ag9311maq is used for 100W USB type C to HDMI with PD fast charging +u3+sd/cf docking station scheme description