当前位置:网站首页>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 .
边栏推荐
- NVIDIA Jetson test installation yolox process record
- The weight of the product page of the second level classification is low. What if it is not included?
- 跨模态语义关联对齐检索-图像文本匹配(Image-Text Matching)
- Kubernetes static pod (static POD)
- C#中string用法
- 7. Regularization application
- Handwriting a simulated reentrantlock
- 3. MNIST dataset classification
- 英雄联盟胜负预测--简易肯德基上校
- Su embedded training - Day8
猜你喜欢
How to use education discounts to open Apple Music members for 5 yuan / month and realize member sharing
Redis, do you understand the list
133. Clone map
新库上线 | CnOpenData中华老字号企业名录
第四期SFO销毁,Starfish OS如何对SFO价值赋能?
Vscode reading Notepad Chinese display garbled code
14. Draw network model structure
Definition and classification of energy
Smart grid overview
10. CNN applied to handwritten digit recognition
随机推荐
Su embedded training - Day9
Cascade-LSTM: A Tree-Structured Neural Classifier for Detecting Misinformation Cascades(KDD20)
Codeforces Round #804 (Div. 2)
A speed Limited large file transmission tool for every major network disk
手机上炒股安全么?
ThinkPHP kernel work order system source code commercial open source version multi user + multi customer service + SMS + email notification
C# ?,?.,?? .....
From starfish OS' continued deflationary consumption of SFO, the value of SFO in the long run
Markdown learning (entry level)
130. Zones environnantes
What does interface testing test?
Semantic segmentation model base segmentation_ models_ Detailed introduction to pytorch
7. Regularization application
9. Introduction to convolutional neural network
CVE-2022-28346:Django SQL注入漏洞
50Mhz产生时间
14.绘制网络模型结构
Cross modal semantic association alignment retrieval - image text matching
6.Dropout应用
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