What does the key1 field code refer to
This article will explain in detail what the key1 field code refers to. The editor thinks it is very practical, so I share it for you as a reference. I hope you can get something after reading this article.
Data loading in Echarts and the use of varmap= {'key1':a1,'key2':a2,}, IT newcomer, just encountered the problem of multi-field display of data in Echarts during his internship, and finally found that this problem can be used in KMurv format.
What is the key1 field?
You often encounter the same display field in Echarts.js that contains two fields.
What is passed over in the background is that there are many two fields in a List,list. It's time to use Map in js to deal with this situation.
Key1 field code
Varjson1= []; / / is used to store mapped list data. Json1.push (map), where map is the newly created map
VardataAxis= []; / / is used to store legend label data
$.ajax ({
Type:'get', should be the driving force of controller and access function
ContentType: "application/json;charset=utf-8", / / data transfer format json, utf-8
DataType:'json'
Error:function () {
Alert ("cuowu"); / / the backend entered this function in response to an error
}
Success:function (json) {/ / background response successfully entered this function
/ / 1-get the data phase required by the function from json
VarlabelOption= {
Normal: {
Show:true
Rotate:90
Align:'left'
VerticalAlign:'middle'
Position:'insideBottom'
Distance:15
Formatter:' {c} {name | {a}}', / / the table needs to display even fields
FontSize:16
Rich: {
Name: {
TextBorderColor:'#fff'
}
}
}
This is the end of this article on "what the key1 field code refers to". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, please share it out for more people to see.