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

PieSerie columns #21

Open
cocoaysj opened this issue May 22, 2014 · 2 comments
Open

PieSerie columns #21

cocoaysj opened this issue May 22, 2014 · 2 comments

Comments

@cocoaysj
Copy link

When use 'columns' and 'useTotals' in PieSerie, the legend show the names of columns I defined in the 'columns'. How to show record value like using 'categorieField'.

@JoeKuan
Copy link
Owner

JoeKuan commented May 28, 2014

Sorry for the late reply. Please can you supply with the config file and the series data and I will look into it.

@cocoaysj
Copy link
Author

var testStore = Ext.create('Ext.data.Store', {
    fields: ['key1', 'value1', 'key2', 'value2', 'key3', 'value3'],
    data: [
        {key1: 'KEY1', value1: 200, key2: 'KEY2', value2: 300, key3: 'KEY3', value3: 500},
        {key1: 'KEY1', value1: 100, key2: 'KEY2', value2: 200, key3: 'KEY3', value3: 400},
        {key1: 'KEY1', value1: 200, key2: 'KEY2', value2: 600, key3: 'KEY3', value3: 700}
    ]
});
var testChart = Ext.create('Chart.ux.Highcharts', {
    initAnimAfterLoad: false,
    series: [
        {
            type: 'pie',
            useTotals: true,
            columns: ['value1', 'value2', 'value3'],
            name: 'count'
        }
    ],
    store: testStore,
    chartConfig: {
        chart: {
            type: 'pie'
        },
        plotOptions: {
            pie: {
                colors: PIE_CHART_COLORS,
                dataLabels: false,
                showInLegend: true
            }
        },
        credits: false, title: {text: '', floating: true}
    }
});

just like the config above, now the legend shows "value1 value2 value3", how can i let it show "KEY1 KEY2 KEY3"? Or my idea is wrong?
thank u for replying me.

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

2 participants