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

Want to pass list to Bar chart values #2913

Closed
birdsarah opened this issue Sep 26, 2015 · 5 comments
Closed

Want to pass list to Bar chart values #2913

birdsarah opened this issue Sep 26, 2015 · 5 comments

Comments

@birdsarah
Copy link
Member

I was hoping to do what is shown here:
screen shot 2015-09-25 at 9 39 30 pm

to get a bar chart like:
image

@rothnic
Copy link
Contributor

rothnic commented Dec 10, 2015

@fpliger, I think this would be a good example of simplifying the use of the blend operation. The current example stacked_bar.py produces this, but with more work. I think it makes sense to accept multiple values columns, in the same way that line, timeseries, area accept series input and understand that internally the data blend would occur.

The challenge here is what do you call the label associated with ['bronze', 'silver', 'gold']? You'd want something like "medals" set as an optional input option, but for it to also work without specifying. I think right now the blend uses a default value, since it is utilizing pandas.melt, but with this case we'd also want to support a kwarg to set the label as well.

I think it would also provide an alternative for supporting the simple data types. Bar({'a': 5, 'b': 8}, values=['a', 'b']).

@fpliger
Copy link
Contributor

fpliger commented Dec 10, 2015

Agreed... it's not that hard to make it work when you have lists as input type for values. We could stick with melt default (IIRC it's value)

I think we could include this into 0.11..

I think it would also provide an alternative for supporting the simple data types. Bar({'a': 5, 'b': 8}, values=['a', 'b']).

this use case requires more work though as you'd need a way to convert to {'a': [5], 'b': [8]}

@rothnic
Copy link
Contributor

rothnic commented Dec 10, 2015

Yeah, I quickly added that locally, but we need to decide what input like that means. So, if we receive only scalars as the values, do we want the keys to be the columns or the index?

Result could be:

orient='columns'

   a  b
0  5  8

or

orient='index'

   0
a  5
b  8

@Maggie-M
Copy link
Contributor

moved to bkcharts repo

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants