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

how to drilldown a pie chart #60

Open
Fanduzi opened this issue Apr 14, 2020 · 0 comments
Open

how to drilldown a pie chart #60

Fanduzi opened this issue Apr 14, 2020 · 0 comments

Comments

@Fanduzi
Copy link

Fanduzi commented Apr 14, 2020

hihgchatrs support drilldown
https://www.highcharts.com/demo/pie-drilldown

Does charts support drilldown?
I tried it and it didn't work

import charts
series = [{
    'type': 'pie',
    'name': 'Things',
    'colorByPoint': True,
    'data': [{
        'name': 'Animals',
        'y': 5,
        'drilldown': 'animals'
    }, {
        'name': 'Fruits',
        'y': 2,
        'drilldown': 'fruits'
    }, {
        'name': 'Cars',
        'y': 4,
        'drilldown': 'cars'
    }]
}]

drilldown = {
    'series': [{
        'id': 'animals',
        'data': [
            ['Cats', 4],
            ['Dogs', 2],
            ['Cows', 1],
            ['Sheep', 2],
            ['Pigs', 1]
        ]
    }, {
        'id': 'fruits',
        'data': [
            ['Apples', 4],
            ['Oranges', 2]
        ]
    }, {
        'id': 'cars',
        'data': [
            ['Toyota', 4],
            ['Opel', 2],
            ['Volkswagen', 2]
        ]
    }]
}
    

charts.plot(series, options={'title': {'text': 'A pie chart'}}, show='inline')
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

1 participant