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

Support for Pie Chart #68

Open
merz9b opened this issue Mar 8, 2017 · 6 comments
Open

Support for Pie Chart #68

merz9b opened this issue Mar 8, 2017 · 6 comments

Comments

@merz9b
Copy link

merz9b commented Mar 8, 2017

As far as I know, the current package only support line,scatter,bar,bar_line types...Thanks...

@yihengli
Copy link

yihengli commented Mar 8, 2017

I do think that's a good chart to get added. This is how I customize the chart by directly changing the json option.

from krisk import Chart
chart = Chart()
chart.set_title('Test for Pie', x_pos='center')
chart.option['series'] = [{
    'type':
    'pie',
    'radius': ["50%", "80%"],
    'data': [{
        'value': 10,
        'name': 'cool'
    }, {
        'value': 20,
        'name': 'notcool'
    }]
}]
chart.option.pop('xAxis', None)
chart.option.pop('yAxis', None)

chart

Ideally you should see something like:

pie_output

Hope this will help.

@napjon
Copy link
Owner

napjon commented Mar 9, 2017

Hi @merz9b,

Yes, pie chart will be added in the future. If you are willing to take a shot, your contribution is very much welcome.

Meanwhile, the visualization is also easy to implement as pointed out by @yihengli's excellent suggestion.

@merz9b merz9b closed this as completed Mar 9, 2017
@merz9b
Copy link
Author

merz9b commented Mar 9, 2017

@yihengli Thanks...

This is certainly a way to customize any charts supported by Echarts...however, it requires some trivial transformations when the data is represented as a dataframe...

@napjon napjon changed the title Have you considered to add the pie chart module in krisk Support for Pie Chart Mar 15, 2017
@napjon
Copy link
Owner

napjon commented Mar 15, 2017

I have to reopen for self-note in the future to implement this.

@napjon napjon reopened this Mar 15, 2017
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

4 participants
@napjon @yihengli @merz9b and others