当前位置:网站首页>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 .
边栏推荐
- Ag9310 design USB type C to hdmi+u2+5v slow charging scheme design | ag9310 expansion dock scheme circuit | type-C dongle design data
- NVIDIA Jetson test installation yolox process record
- Serial port receives a packet of data
- ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
- 13.模型的保存和载入
- Cancel the down arrow of the default style of select and set the default word of select
- 6. Dropout application
- Scheme selection and scheme design of multifunctional docking station for type C to VGA HDMI audio and video launched by ange in Taiwan | scheme selection and scheme explanation of usb-c to VGA HDMI c
- Letcode43: string multiplication
- 基于人脸识别实现课堂抬头率检测
猜你喜欢

Two methods for full screen adaptation of background pictures, background size: cover; Or (background size: 100% 100%;)

国外众测之密码找回漏洞

英雄联盟胜负预测--简易肯德基上校

图像数据预处理

For the first time in China, three Tsinghua Yaoban undergraduates won the stoc best student thesis award

基于卷积神经网络的恶意软件检测方法

Chapter 16 intensive learning

13. Enregistrement et chargement des modèles

130. Zones environnantes

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
随机推荐
Handwriting a simulated reentrantlock
Vscode reading Notepad Chinese display garbled code
C# ?,?.,?? .....
10. CNN applied to handwritten digit recognition
完整的模型验证(测试,demo)套路
y59.第三章 Kubernetes从入门到精通 -- 持续集成与部署(三二)
Saving and reading of network model
Chapter XI feature selection
[go record] start go language from scratch -- make an oscilloscope with go language (I) go language foundation
Ag9310 for type-C docking station scheme circuit design method | ag9310 for type-C audio and video converter scheme circuit design reference
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
Chapter 7 Bayesian classifier
Jemter distributed
【深度学习】AI一键换天
Chapter IV decision tree
基础篇——整合第三方技术
Recommend a document management tool mendely Reference Manager
Smart grid overview
3. MNIST dataset classification
跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)