当前位置:网站首页>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>
边栏推荐
- 6.Dropout应用
- Ag7120 and ag7220 explain the driving scheme of HDMI signal extension amplifier | ag7120 and ag7220 design HDMI signal extension amplifier circuit reference
- AI遮天传 ML-回归分析入门
- Serial port receives a packet of data
- 2.非线性回归
- 50Mhz产生时间
- The whole life cycle of commodity design can be included in the scope of industrial Internet
- 133. Clone map
- jemter分布式
- Is it safe to speculate in stocks on mobile phones?
猜你喜欢
New library online | cnopendata China Star Hotel data
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
8. Optimizer
7. Regularization application
[deep learning] AI one click to change the sky
Interface test advanced interface script use - apipost (pre / post execution script)
11. Recurrent neural network RNN
3.MNIST数据集分类
新库上线 | CnOpenData中国星级酒店数据
5.过拟合,dropout,正则化
随机推荐
Su embedded training - Day7
Vs code configuration latex environment nanny level configuration tutorial (dual system)
14.绘制网络模型结构
8.优化器
Several frequently used OCR document scanning tools | no watermark | avoid IQ tax
7.正则化应用
Introduction to ML regression analysis of AI zhetianchuan
Cs5261type-c to HDMI alternative ag9310 | ag9310 alternative
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
Su embedded training - Day9
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
1. Linear regression
Handwriting a simulated reentrantlock
C# ?,?.,?? .....
9.卷积神经网络介绍
Ag7120 and ag7220 explain the driving scheme of HDMI signal extension amplifier | ag7120 and ag7220 design HDMI signal extension amplifier circuit reference
Authorization code of Axure rp9
Introduction to paddle - using lenet to realize image classification method II in MNIST
Design method and application of ag9311maq and ag9311mcq in USB type-C docking station or converter
Image data preprocessing