当前位置:网站首页>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>
边栏推荐
- Basic types of 100 questions for basic grammar of Niuke
- Several frequently used OCR document scanning tools | no watermark | avoid IQ tax
- 2.非线性回归
- Vs code configuration latex environment nanny level configuration tutorial (dual system)
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
- 4. Cross entropy
- 1.线性回归
- USB type-C mobile phone projection scheme | USB type-C docking station scheme | TV / projector type-C converter scheme | ag9300ag9310ag9320
- Introduction to paddle - using lenet to realize image classification method II in MNIST
- 13. Model saving and loading
猜你喜欢
11.递归神经网络RNN
13.模型的保存和載入
Codeforces Round #804 (Div. 2)(A~D)
jemter分布式
Su embedded training - Day9
Recommend a document management tool Zotero | with tutorials and learning paths
Password recovery vulnerability of foreign public testing
6.Dropout应用
SDNU_ ACM_ ICPC_ 2022_ Summer_ Practice(1~2)
USB type-C mobile phone projection scheme | USB type-C docking station scheme | TV / projector type-C converter scheme | ag9300ag9310ag9320
随机推荐
Definition and classification of energy
C#中string用法
Stock account opening is free of charge. Is it safe to open an account on your mobile phone
130. 被围绕的区域
13. Model saving and loading
Fofa attack and defense challenge record
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
13. Enregistrement et chargement des modèles
Markdown learning (entry level)
Basic types of 100 questions for basic grammar of Niuke
Codeforces Round #804 (Div. 2)
Study notes of single chip microcomputer and embedded system
C# ?,?.,?? .....
[necessary for R & D personnel] how to make your own dataset and display it.
基础篇——整合第三方技术
5. Over fitting, dropout, regularization
2.非线性回归
基于人脸识别实现课堂抬头率检测
串口接收一包数据
14. Draw network model structure