当前位置:网站首页>Common effects of line chart
Common effects of line chart
2022-07-08 01:11:00 【Just love life】
Common effect
Mark : Maximum minimum value Average Mark the interval
markPoint 、markLine、markArea
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, markPoint:{
data:[
{
type:'max'
},
{
type:'min'
}
]
}, markLine:{
data:[
{
type:'average'
}
]
}, markArea:{
data:[ [
{
xAxis:'1 month '
},
{
xAxis:'2 month '
}
],[
{
xAxis:'7 month '
},{
xAxis:'8 month '
}
]
]
}
}
]
}
// step 5: Set the configuration item to echarts Instance object
mCharts.setOption(option)
</script>
</body>
</html>
Line control : smooth 、 style
smooth、lineStyle
Fill the style
areaStyle
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, markPoint:{
data:[
{
type:'max'
},
{
type:'min'
}
]
}, markLine:{
data:[
{
type:'average'
}
]
}, markArea:{
data:[ [
{
xAxis:'1 month '
},
{
xAxis:'2 month '
}
],[
{
xAxis:'7 month '
},{
xAxis:'8 month '
}
]
]
}, smooth:true , // smooth lineStyle:{
color:'blue',
type:'solid' //dashed dotted solid
}, areaStyle:{
color:'pink'
}
}
]
}
// step 5: Set the configuration item to echarts Instance object
mCharts.setOption(option)
</script>
</body>
</html>
边栏推荐
- Codeforces Round #804 (Div. 2)(A~D)
- 13.模型的保存和载入
- Image data preprocessing
- 串口接收一包数据
- Ag9310 design USB type C to hdmi+u2+5v slow charging scheme design | ag9310 expansion dock scheme circuit | type-C dongle design data
- 新库上线 | CnOpenData中国星级酒店数据
- FOFA-攻防挑战记录
- 133. 克隆图
- Binder core API
- Implementation of adjacency table of SQLite database storage directory structure 2-construction of directory tree
猜你喜欢
12. RNN is applied to handwritten digit recognition
AI遮天传 ML-初识决策树
130. 被圍繞的區域
9. Introduction to convolutional neural network
Introduction to ML regression analysis of AI zhetianchuan
11.递归神经网络RNN
1. Linear regression
Share a latex online editor | with latex common templates
3.MNIST数据集分类
Codeforces Round #804 (Div. 2)(A~D)
随机推荐
【深度学习】AI一键换天
Chapter 5 neural network
CVE-2022-28346:Django SQL注入漏洞
Design method and application of ag9311maq and ag9311mcq in USB type-C docking station or converter
Fundamentals - integrating third-party technology
基于人脸识别实现课堂抬头率检测
Study notes of single chip microcomputer and embedded system
letcode43:字符串相乘
Markdown learning (entry level)
Know how to get the traffic password
3.MNIST数据集分类
What does interface testing test?
Ag9310 design USB type C to hdmi+u2+5v slow charging scheme design | ag9310 expansion dock scheme circuit | type-C dongle design data
Letcode43: string multiplication
第四期SFO销毁,Starfish OS如何对SFO价值赋能?
Complete model training routine
Complete model verification (test, demo) routine
14.绘制网络模型结构
Introduction to paddle - using lenet to realize image classification method II in MNIST
跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)