当前位置:网站首页>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>
边栏推荐
- y59.第三章 Kubernetes从入门到精通 -- 持续集成与部署(三二)
- The whole life cycle of commodity design can be included in the scope of industrial Internet
- From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
- 11. Recurrent neural network RNN
- Reentrantlock fair lock source code Chapter 0
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
- Basic types of 100 questions for basic grammar of Niuke
- 130. 被圍繞的區域
- AI遮天传 ML-回归分析入门
- What does interface testing test?
猜你喜欢

Get started quickly using the local testing tool postman

Complete model verification (test, demo) routine

Ag7120 and ag7220 explain the driving scheme of HDMI signal extension amplifier | ag7120 and ag7220 design HDMI signal extension amplifier circuit reference

Cve-2022-28346: Django SQL injection vulnerability

9. Introduction to convolutional neural network

基于微信小程序开发的我最在行的小游戏

Capstone/cs5210 chip | cs5210 design scheme | cs5210 design data

Ag9310meq ag9310mfq angle two USB type C to HDMI audio and video data conversion function chips parameter difference and design circuit reference

完整的模型训练套路

AI遮天传 ML-回归分析入门
随机推荐
Invalid V-for traversal element style
Study notes of single chip microcomputer and embedded system
Cross modal semantic association alignment retrieval - image text matching
German prime minister says Ukraine will not receive "NATO style" security guarantee
股票开户免费办理佣金最低的券商,手机上开户安全吗
Stock account opening is free of charge. Is it safe to open an account on your mobile phone
[note] common combined filter circuit
基础篇——整合第三方技术
Vs code configuration latex environment nanny level configuration tutorial (dual system)
基于微信小程序开发的我最在行的小游戏
How to use education discounts to open Apple Music members for 5 yuan / month and realize member sharing
Cve-2022-28346: Django SQL injection vulnerability
3.MNIST数据集分类
[go record] start go language from scratch -- make an oscilloscope with go language (I) go language foundation
How to transfer Netease cloud music /qq music to Apple Music
Su embedded training - Day6
130. 被围绕的区域
130. 被圍繞的區域
Codeforces Round #804 (Div. 2)(A~D)
Chapter 16 intensive learning