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

Temporary solution for chart radar can display axisLabel correctly. #10036

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

jeoy
Copy link
Contributor

@jeoy jeoy commented Mar 4, 2019

Add a defensive statement for axisModel.getCategories, so axisLabel of chart radar can display correctly (cannot trigger event though, which isn't used widely).

It's a temporary solution until axisLabel of chart radar supported in the next release.

@Ovilia
Copy link
Contributor

Ovilia commented Mar 6, 2019

LGTM. @100pah Please have a check.

Tested with the following demo and worked.

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)'
            }
        ]
    }]
};

@100pah 100pah merged commit 243b22f into apache:master Mar 26, 2019
@100pah
Copy link
Member

100pah commented Mar 26, 2019

Thanks @jeoy

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

Successfully merging this pull request may close these issues.

3 participants