当前位置:网站首页>Basic realization of line graph
Basic realization of line graph
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
x Axis data :
data 1:[‘1 month ’,‘2 month ’,‘3 month ’,‘4 month ’,‘5 month ’,‘6 month ’,‘7 month ’,‘8 month ’,‘9 month ’,‘10 month ’,‘11 month ’,‘12 month ’]
y Axis data :
data 2:[3000,2800,900,1000,800,700,1400,1300,900,1000,800,600]
Chart type :
stay series Lower setup type:line
Code
<!-- 1.ECharts The most basic code structure 2.x Axis data :['1 month ','2 month ','3 month ','4 month ','5 month ','6 month ','7 month ','8 month ','9 month ','10 month ','11 month ','12 month '] 3.y Axis data :[3000,2800,900,1000,800,700,1400,1300,900,1000,800,600] 4. take type Is set to bar --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <script src="lib/echarts.min.js"></script> </head> <body> <div style="width: 600px;height: 400px;"></div> <script> var mCharts= echarts.init(document.querySelector('div')) var xDataArr=['1 month ','2 month ','3 month ','4 month ','5 month ','6 month ','7 month ','8 month ','9 month ','10 month ','11 month ','12 month '] var yDaraArr=[3000,2800,900,1000,800,700,1400,1300,900,1000,800,600] var option={
xAxis:{
type:'category' ,// Taxonomic axis
data:xDataArr
}, yAxis:{
type:'value' ,// Value axis
}, series:[
{
name:' a brand of instant noodles ',
type:'line', //bar It's a histogram ,line It's linear ,pie It's pie shaped
data:yDaraArr
}
]
}
// step 5: Set the configuration item to echarts Instance object
mCharts.setOption(option)
</script>
</body>
</html>
边栏推荐
- C# ?,?.,?? .....
- 9. Introduction to convolutional neural network
- STL--String类的常用功能复写
- Prediction of the victory or defeat of the League of heroes -- simple KFC Colonel
- 6.Dropout应用
- AI zhetianchuan ml novice decision tree
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
- Introduction to paddle - using lenet to realize image classification method II in MNIST
- 股票开户免费办理佣金最低的券商,手机上开户安全吗
- Marubeni official website applet configuration tutorial is coming (with detailed steps)
猜你喜欢
A network composed of three convolution layers completes the image classification task of cifar10 data set
Redis, do you understand the list
Design method and application of ag9311maq and ag9311mcq in USB type-C docking station or converter
Chapter 5 neural network
EDP to LVDS conversion design circuit | EDP to LVDS adapter board circuit | capstone/cs5211 chip circuit schematic reference
2. Nonlinear regression
国外众测之密码找回漏洞
Invalid V-for traversal element style
Su embedded training - Day6
Class head up rate detection based on face recognition
随机推荐
Su embedded training - Day7
Ag9310 for type-C docking station scheme circuit design method | ag9310 for type-C audio and video converter scheme circuit design reference
7. Regularization application
How does starfish OS enable the value of SFO in the fourth phase of SFO destruction?
Jemter distributed
[note] common combined filter circuit
Parade ps8625 | replace ps8625 | EDP to LVDS screen adapter or screen drive board
High quality USB sound card / audio chip sss1700 | sss1700 design 96 kHz 24 bit sampling rate USB headset microphone scheme | sss1700 Chinese design scheme explanation
jemter分布式
133. Clone map
The weight of the product page of the second level classification is low. What if it is not included?
Cross modal semantic association alignment retrieval - image text matching
8.优化器
130. Surrounding area
[deep learning] AI one click to change the sky
Several frequently used OCR document scanning tools | no watermark | avoid IQ tax
13.模型的保存和載入
swift获取url参数
String usage in C #
Su embedded training - Day5