雷达图刻度标签显示不出来,js出错:TypeError: e.getCategories is not a function
One-line summary [问题简述]
雷达图刻度显示不出来,js出错:TypeError: e.getCategories is not a function
Version & Environment [版本及环境]
- ECharts version [4.0.4]:
- Browser version [chrome 64.0.3282.186]:
- OS Version [mac10.13.3 ]:
Expected behaviour [期望结果]
雷达图可以显示出刻度值
ECharts option [ECharts配置项]
option = {
title: {
text: '基础雷达图'
},
tooltip: {},
legend: {
data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)']
},
radar: {
// shape: 'circle',
name: {
show:true,
textStyle: {
color: '#fff',
backgroundColor: '#999',
borderRadius: 3,
padding: [3, 5]
}
},
formatter: '{value} kg',
indicator: [
{ name: '销售(sales)', min:0, max: 6500, axisLabel: { show: true }},
{ name: '管理(Administration)',min:0, max: 16000},
{ name: '信息技术(Information Techology)',min:0, max: 30000},
{ name: '客服(Customer Support)', min:0, max: 38000},
{ name: '研发(Development)', min:0, max: 52000},
{ name: '市场(Marketing)', min:0, max: 25000}
],
splitNumber: 10,
axisLabel: {
show: true,
inside: true,
margin: 10,
formatter: '{value} %',
textStyle: {
fontSize: 2,
}
}
},
series: [{
name: '预算 vs 开销(Budget vs spending)',
type: 'radar',
// areaStyle: {normal: {}},
data : [
{
value : [4300, 10000, 28000, 35000, 50000, 19000],
name : '预算分配(Allocated Budget)'
},
{
value : [5000, 14000, 28000, 31000, 42000, 21000],
name : '实际开销(Actual Spending)'
}
]
}]
}
Other comments [其他信息]
没用哦,按照你们给的参数也是报错 Error in mounted hook: "TypeError: axisModel.getCategories is not a function" 版本是4.0.4
很奇怪了,我前两天试的报错,还给他们提了bug,今天再试,就没事了,我更新了谷歌到65....
axisTick:{ show: true, }添加展示刻度;
TypeError: e.getCategories is not a function报错是因为:
axisLabel: {
show: true,
inside: true,
margin: 10,
formatter: '{value} %',
textStyle: {
fontSize: 2,
}
}
},
axisLabe是用来展示刻度的标签的,不是展示刻度的,刻度用标签axisTick控制
我升级到chrome 65.0.3325.181,还是报同样的错误。 我只是想在雷达图上显示刻度label,但是只要设置axisLabel: {show: true},就会报:TypeError: axisModel.getCategories is not a function
是的 ,我的也是chrome65版本 也会报错,我也想显示数字1,2,3,4,5
降echarts.js版本,3.x的就没问题了哦
3.x, 4.x都试了,还是报错,有其他方法解决吗?
雷达图并不支持 axisLabel 设置。所有的 axisLabel 都去掉就好了。
(文档里有些错误,我更新下)
Fixed in #10036