翻遍了echarts文檔沒有發(fā)現哪項設置能夠顯示,官方示例和Gallery中也都有沒有符合要求的
想要的效果是這樣,在這個軸上顯示一個數值方便查看和對比
Gallery中看到一個符合要求的,但是他的例子只不過是把數據的值設置為相同的,然后顯示值達到類似的效果,我的圖數據多,每個值顯示出來會很亂,而且也不可能每個值都相同.
上代碼
$.ajax({
type: 'get',
url: '../csv2json/ttl-G1-radar.json',//請求數據的地址
dataType: 'json', //返回數據形式為json
success: function (result) {
var datas = [];
for (var i=0;i<result['列1'].length;i++){
var alldata = {text:result['列1'][i]}
datas.push(alldata)
};
var se = [];
for (var key in result){
if(key == '列1'){
}else{
se.push({
type:'radar',
// zlevel:2,
data:[{
name:key,
value:result[key]
}],
symbol:'circle',
// silent:true, //是否可交互,true不交互
})
}
}
myChart.setOption({
title: {
text: 'total-豪華車'
},
tooltip: {
show: true
},
legend: {
type: 'scroll',
orient: 'vertical', //設置欄位如何顯示,橫軸或縱軸
top: '10%',
left: '10%',
},
radar: {
splitNumber: '6',
triggerEvent: true,
// scale: true,
axisLabel:{
inside:false,
// formatter:'{value}kg',
fontStyle:'oblique',
},
// splitLine:{
// show:true,
// lineStyle:{
// color:'red',
// width:2,
// type:'soild',
// }
// },
splitArea:{
show:true
},
indicator: datas,
center: ['60%', '50%'],
radius: '60%',
},
// 全局文字樣式
textStyle: {
color: 'black',
},
series:se
});
},
})
json數據示例
{
"謳歌": [
"9",
"12",
"14",
"16",
"10",
"12",
"9",
"14",
"10",
"11",
"17",
"12",
"10",
"9",
"9",
"10",
"13",
"9",
"10",
"9",
"9",
"10",
"13",
"12",
"13",
"12",
"9",
"12",
"13",
"17"
],
"列1": [
"4S店網點多",
"安全的",
"不斷出新的",
"操控性好",
"操作簡便",
"產品外觀設計吸引人",
"車輛價格實惠",
"動力強勁的",
"返修率低",
"廣告吸引人",
"國際品牌",
"國際市場領導者",
"國內市場領導者",
"環(huán)保的",
"技術領先的",
"駕駛舒適的",
"堅固耐用的",
"歷史悠久的",
"內部空間寬敞",
"內部裝飾有吸引力",
"年輕有活力的",
"省油",
"試駕體驗好",
"售后維修保養(yǎng)服務好",
"體現身份和社會地位",
"維修保養(yǎng)成本低",
"物有所值",
"銷售服務好",
"值得信賴",
"專業(yè)的"
],
"寶馬": [
"34",
"40",
"34",
"38",
"31",
"38",
"19",
"38",
"31",
"34",
"46",
"43",
"33",
"25",
"43",
"38",
"31",
"42",
"37",
"38",
"33",
"21",
"31",
"32",
"48",
"20",
"26",
"34",
"38",
"41"
]
}
option = {
title: {
text: '基礎雷達圖'
},
tooltip: {},
legend: {
data: ['謳歌', '寶馬']
},
//極坐標系的徑向軸
polar: {},
angleAxis: {},
radiusAxis: {
type: 'value',
min: 0,
max: 100,
interval: 20
},
radar: {
// shape: 'circle',
name: {
textStyle: {
color: '#fff',
backgroundColor: '#999',
borderRadius: 3,
padding: [3, 5]
}
},
indicator: [
{ name: "4S店網點多", max: 100},
{ name: "安全的", max: 100},
{ name: "不斷出新的", max: 100},
{ name: "操控性好", max: 100},
{ name: "操作簡便", max: 100},
{ name: "產品外觀設計吸引人", max: 100},
{ name: "車輛價格實惠", max: 100},
{ name: "動力強勁的", max: 100},
{ name: "返修率低", max: 100},
{ name: "廣告吸引人", max: 100},
{ name: "國際品牌", max: 100},
{ name: "國際市場領導者", max: 100},
{ name: "國內市場領導者", max: 100},
{ name: "駕駛舒適的", max: 100},
{ name: "堅固耐用的", max: 100},
{ name: "環(huán)保的", max: 100},
{ name: "技術領先的", max: 100},
{ name: "歷史悠久的", max: 100},
{ name: "內部空間寬敞", max: 100},
{ name: "內部裝飾有吸引力", max: 100},
{ name: "年輕有活力的", max: 100},
{ name: "省油", max: 100},
{ name: "試駕體驗好", max: 100},
{ name: "售后維修保養(yǎng)服務好", max: 100},
{ name: "體現身份和社會地位", max: 100},
{ name: "維修保養(yǎng)成本低", max: 100},
{ name: "物有所值", max: 100},
{ name: "銷售服務好", max: 100},
{ name: "值得信賴", max: 100},
{ name: "專業(yè)的", max: 100}
]
},
series: [{
name: '謳歌 vs 寶馬',
type: 'radar',
// areaStyle: {normal: {}},
data : [
{
value : [9, 12, 14, 16, 10, 12, 9, 14, 10, 11, 17, 12, 10, 9, 9, 10, 13, 9, 10, 9, 9, 10, 13, 12, 13, 12, 9, 12, 13, 17],
name : '謳歌',
// 節(jié)點展示數據
label: {
normal: {
show: true,
formatter:function(params) {
return params.value;
}
}
}
},
},
{
value : [34, 40, 34, 38, 31, 38, 19, 38, 31, 34, 46, 43, 33, 25, 43, 38, 31, 42, 37, 38, 33, 21, 31, 32, 48, 20, 26, 34, 38, 41],
name : '寶馬',
// 節(jié)點展示數據
label: {
normal: {
show: true,
formatter:function(params) {
return params.value;
}
}
}
},
}
]
}]
};
北大青鳥APTECH成立于1999年。依托北京大學優(yōu)質雄厚的教育資源和背景,秉承“教育改變生活”的發(fā)展理念,致力于培養(yǎng)中國IT技能型緊缺人才,是大數據專業(yè)的國家
北大青鳥中博軟件學院創(chuàng)立于2003年,作為華東區(qū)著名互聯(lián)網學院和江蘇省首批服務外包人才培訓基地,中博成功培育了近30000名軟件工程師走向高薪崗位,合作企業(yè)超4
中公教育集團創(chuàng)建于1999年,經過二十年潛心發(fā)展,已由一家北大畢業(yè)生自主創(chuàng)業(yè)的信息技術與教育服務機構,發(fā)展為教育服務業(yè)的綜合性企業(yè)集團,成為集合面授教學培訓、網
達內教育集團成立于2002年,是一家由留學海歸創(chuàng)辦的高端職業(yè)教育培訓機構,是中國一站式人才培養(yǎng)平臺、一站式人才輸送平臺。2014年4月3日在美國成功上市,融資1
曾工作于聯(lián)想擔任系統(tǒng)開發(fā)工程師,曾在博彥科技股份有限公司擔任項目經理從事移動互聯(lián)網管理及研發(fā)工作,曾創(chuàng)辦藍懿科技有限責任公司從事總經理職務負責iOS教學及管理工作。
浪潮集團項目經理。精通Java與.NET 技術, 熟練的跨平臺面向對象開發(fā)經驗,技術功底深厚。 授課風格 授課風格清新自然、條理清晰、主次分明、重點難點突出、引人入勝。
精通HTML5和CSS3;Javascript及主流js庫,具有快速界面開發(fā)的能力,對瀏覽器兼容性、前端性能優(yōu)化等有深入理解。精通網頁制作和網頁游戲開發(fā)。
具有10 年的Java 企業(yè)應用開發(fā)經驗。曾經歷任德國Software AG 技術顧問,美國Dachieve 系統(tǒng)架構師,美國AngelEngineers Inc. 系統(tǒng)架構師。