Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Radar雷达图,v4.1.0.rc2版本axisLabel使用后崩溃,3.8.5版本没有问题 #8663

Closed
kl12000 opened this issue Jul 7, 2018 · 2 comments

Comments

@kl12000
Copy link

kl12000 commented Jul 7, 2018

以官网链接为例:http://echarts.baidu.com/examples/editor.html?c=radar

One-line summary [问题简述]

Radar雷达使用axisLabel后,直接崩溃。
axisLabel:{
show:true,
}

echarts.js:38134 Uncaught TypeError: axisModel.getCategories is not a function
at buildAxisLabel (echarts.js:38134)
at AxisBuilder.axisTickLabel (echarts.js:37751)
at AxisBuilder.add (echarts.js:37626)
at Array.forEach ()
at each$1 (echarts.js:524)
at ExtendedClass. (echarts.js:42087)
at Array.forEach ()
at each$1 (echarts.js:524)
at ExtendedClass._buildAxes (echarts.js:42086)
at ExtendedClass.render (echarts.js:42068)


38133 var labelLayout = innerTextLayout(opt.rotation, labelRotation, opt.labelDirection);
38134 var rawCategoryData = axisModel.getCategories(true);

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:v4.1.0.rc2
  • Browser version [浏览器类型和版本]:chorme,IE
  • OS Version [操作系统类型和版本]:win7

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {
    title: {
        text: '基础雷达图'
    },
    tooltip: {},
    legend: {
        data: ['预算分配(Allocated Budget)', '实际开销(Actual Spending)']
    },
    radar: {
        // shape: 'circle',
        name: {
            textStyle: {
                color: '#fff',
                backgroundColor: '#999',
                borderRadius: 3,
                padding: [3, 5]
           }
        },
        indicator: [
           { name: '销售(sales)', max: 6500},
           { name: '管理(Administration)', max: 16000},
           { name: '信息技术(Information Techology)', max: 30000},
           { name: '客服(Customer Support)', max: 38000},
           { name: '研发(Development)', max: 52000},
           { name: '市场(Marketing)', max: 25000}
        ],
        axisLabel:{
            show:true,
        }
    },
    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)'
            }
        ]
    }]
};
@lwl0812
Copy link

lwl0812 commented Sep 26, 2018

same problem, expert to solve it!

@100pah
Copy link
Member

100pah commented May 13, 2019

Fixed in #10036

@100pah 100pah closed this as completed May 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants