当前位置:网站首页>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>
边栏推荐
- Taiwan Xinchuang sss1700 latest Chinese specification | sss1700 latest Chinese specification | sss1700datasheet Chinese explanation
- Ag9310meq ag9310mfq angle two USB type C to HDMI audio and video data conversion function chips parameter difference and design circuit reference
- Two methods for full screen adaptation of background pictures, background size: cover; Or (background size: 100% 100%;)
- 3.MNIST数据集分类
- 国外众测之密码找回漏洞
- 11. Recurrent neural network RNN
- 股票开户免费办理佣金最低的券商,手机上开户安全吗
- y59.第三章 Kubernetes从入门到精通 -- 持续集成与部署(三二)
- STL -- common function replication of string class
- Su embedded training - Day5
猜你喜欢
Cancel the down arrow of the default style of select and set the default word of select
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
Chapter 5 neural network
For the first time in China, three Tsinghua Yaoban undergraduates won the stoc best student thesis award
Invalid V-for traversal element style
How to write mark down on vscode
网络模型的保存与读取
13.模型的保存和載入
跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)
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
随机推荐
8. Optimizer
How is it most convenient to open an account for stock speculation? Is it safe to open an account on your mobile phone
1.线性回归
Capstone/cs5210 chip | cs5210 design scheme | cs5210 design data
Recommend a document management tool mendely Reference Manager
手机上炒股安全么?
1. Linear regression
图像数据预处理
14. Draw network model structure
10. CNN applied to handwritten digit recognition
10.CNN应用于手写数字识别
4. Cross entropy
133. Clone map
Redis, do you understand the list
130. Surrounding area
letcode43:字符串相乘
基于卷积神经网络的恶意软件检测方法
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
STL -- common function replication of string class
[deep learning] AI one click to change the sky