当前位置:网站首页>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>
边栏推荐
- C# ?,?.,?? .....
- Smart grid overview
- 8. Optimizer
- A network composed of three convolution layers completes the image classification task of cifar10 data set
- A speed Limited large file transmission tool for every major network disk
- 基于人脸识别实现课堂抬头率检测
- Using GPU to train network model
- Marubeni official website applet configuration tutorial is coming (with detailed steps)
- 133. Clone map
- C# ?,?.,?? .....
猜你喜欢
Chapter VIII integrated learning
Share a latex online editor | with latex common templates
跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)
133. 克隆图
Cs5212an design display to VGA HD adapter products | display to VGA Hd 1080p adapter products
[go record] start go language from scratch -- make an oscilloscope with go language (I) go language foundation
5. Over fitting, dropout, regularization
Chapter 5 neural network
Su embedded training - Day6
AI遮天传 ML-回归分析入门
随机推荐
Semantic segmentation model base segmentation_ models_ Detailed introduction to pytorch
[reprint] solve the problem that CONDA installs pytorch too slowly
1. Linear regression
Markdown learning (entry level)
A speed Limited large file transmission tool for every major network disk
C# ?,?.,?? .....
Using GPU to train network model
Cve-2022-28346: Django SQL injection vulnerability
13. Model saving and loading
C# ?,?.,?? .....
EDP to LVDS conversion design circuit | EDP to LVDS adapter board circuit | capstone/cs5211 chip circuit schematic reference
2022-07-07: the original array is a monotonic array with numbers greater than 0 and less than or equal to K. there may be equal numbers in it, and the overall trend is increasing. However, the number
13.模型的保存和载入
12.RNN应用于手写数字识别
Ag9310 for type-C docking station scheme circuit design method | ag9310 for type-C audio and video converter scheme circuit design reference
jemter分布式
50Mhz产生时间
[go record] start go language from scratch -- make an oscilloscope with go language (I) go language foundation
4.交叉熵
Get started quickly using the local testing tool postman