当前位置:网站首页>Generic configuration legend
Generic configuration legend
2022-07-08 01:11:00 【Just love life】
legend: legend , Used to filter series , Need and series In combination with
legend Medium data Is an array
legend Medium data The value of needs and series Of a set of data in an array name Value consistent
Code
<!-- 1.ECharts The most basic code structure 2.x Axis data :[' Zhang San ',‘ Li Si ’,‘ Wang Wu ’,‘ Intercalary soil ’,‘ Xiao Ming ’,‘ maotai ’,‘ Er Niu ’,‘ Daqiang ’] 3.y Axis data :[88,92,63,77,94,80,72,86] 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=[' Zhang San ',' Li Si ',' Wang Wu ',' Intercalary soil ',' Xiao Ming ',' maotai ',' Er Niu ',' Daqiang '] var yDaraArr1=[70,92,85,89,77,90,87,98] var yDaraArr2=[76,82,85,89,79,90,80,98] var option={
title:{
text:' Results show ', textStyle:{
color:'blue'
},
borderWidth:5,
borderColor:'blue',
borderRadius:5,
left:30,
top:10
}, tooltip:{
trigger:'axis', triggerOn:'click', // formatter:'{b} The results of {c}' formatter:function(arg){
return arg[0].name+' My score is '+arg[0].data
}
}, toolbox:{
feature:{
saveAsImage:{
},// Export pictures dataView:{
}, // Data view restore:{
} , // Data reset ( Restore ) dataZoom:{
}, // Area zoom magicType:{
// Chart switching
type:['bar','line']
}
}
}, legend:{
data:[' Chinese language and literature ',' mathematics ']
}, xAxis:{
type:'category' ,// Taxonomic axis
data:xDataArr
}, yAxis:{
type:'value' ,// Value axis
}, series:[
{
name:' Chinese language and literature ',
type:'bar', //bar It's a histogram ,line It's linear ,pie It's pie shaped
data:yDaraArr1
},
{
name:' mathematics ',
type:'bar',
data:yDaraArr2
}
]
}
// step 5: Set the configuration item to echarts Instance object
mCharts.setOption(option)
</script>
</body>
</html>
General configuration refers to the configuration that can be used by any type of chart .
边栏推荐
- Semantic segmentation model base segmentation_ models_ Detailed introduction to pytorch
- 9.卷积神经网络介绍
- Class head up rate detection based on face recognition
- 基于微信小程序开发的我最在行的小游戏
- New library online | cnopendata China Star Hotel data
- 3. MNIST dataset classification
- Analysis of 8 classic C language pointer written test questions
- 11.递归神经网络RNN
- 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
- 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
猜你喜欢
[note] common combined filter circuit
Cs5212an design display to VGA HD adapter products | display to VGA Hd 1080p adapter products
FOFA-攻防挑战记录
Complete model verification (test, demo) routine
Ag9310 design USB type C to hdmi+u2+5v slow charging scheme design | ag9310 expansion dock scheme circuit | type-C dongle design data
2.非线性回归
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
14.绘制网络模型结构
New library online | cnopendata China Star Hotel data
Su embedded training - Day9
随机推荐
133. Clone map
网络模型的保存与读取
My best game based on wechat applet development
Ag9310 design USB type C to hdmi+u2+5v slow charging scheme design | ag9310 expansion dock scheme circuit | type-C dongle design data
10. CNN applied to handwritten digit recognition
2.非线性回归
Definition and classification of energy
Design method and application of ag9311maq and ag9311mcq in USB type-C docking station or converter
Su embedded training - Day6
基于人脸识别实现课堂抬头率检测
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
Implementation of adjacency table of SQLite database storage directory structure 2-construction of directory tree
Semantic segmentation model base segmentation_ models_ Detailed introduction to pytorch
Su embedded training - Day8
Using GPU to train network model
letcode43:字符串相乘
Four stages of sand table deduction in attack and defense drill
[note] common combined filter circuit
AI遮天传 ML-回归分析入门
国外众测之密码找回漏洞