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 do I use grouping to do a stacked bar? #51

Closed
dilignt opened this issue Jan 20, 2015 · 5 comments
Closed

How do I use grouping to do a stacked bar? #51

dilignt opened this issue Jan 20, 2015 · 5 comments

Comments

@dilignt
Copy link

dilignt commented Jan 20, 2015

It's not clear to me how to use the grouping feature of the API. The documentation points towards the C3 example, but that uses the columns field as the data orientation, whereas angular-chart doesn't seem to support the columns field, but it is still possible to specify orientation. The two APIs seem to be slightly different in this case, and I've not been able to get grouping working in angular-chart.

It would be really helpful to see a grouping, stacked-bar example of the angular-chart API, and how the orientation property works. Aside from this, I've been impressed with angular-chart and found it useful and easy use and integrate.

many thanks in advance

@dilignt dilignt changed the title How do I do use grouping to do a stacked bar? How do I use grouping to do a stacked bar? Jan 20, 2015
@maxklenk
Copy link
Member

Hey @dilignt,
yes the APIs are slightly different, to clarify how to use the grouping feature I create a sample: http://plnkr.co/edit/EWC4Hr?p=preview

Note that groups is an Array of Arrays:

groups: [
  ['data1', 'data2']
]

Please close the issue, if your question is resolved.

@dilignt
Copy link
Author

dilignt commented Jan 22, 2015

Perfect - thanks @maxklenk :)

@dilignt dilignt closed this as completed Jan 22, 2015
@dilignt
Copy link
Author

dilignt commented Jan 22, 2015

Hi again @maxklenk

I've noticed in your example and in my implementation that the tooltip
jumps about when moving the mouse between groups on the chart. I've got
lots of rows in my group and this causes the tooltip to jump half off the
top of the div where the chart is rendered, a long way from the mouse
pointer. Is there anyway to stop this happening?

On 21 January 2015 at 21:10, Max Klenk notifications@github.com wrote:

Hey @dilignt https://github.com/dilignt,
yes the APIs are slightly different, to clarify how to use the grouping
feature I create a sample: http://plnkr.co/edit/EWC4Hr?p=preview

Note that groups is an Array of Arrays:

groups: [
['data1', 'data2']
]

Please close the issue, if your question is resolved.


Reply to this email directly or view it on GitHub
#51 (comment)
.

@maxklenk
Copy link
Member

You can solve this issue by applying the css attribute position: relative; to the angular-chart directive. I am currently not sure why it isn't added by default.

@dilignt
Copy link
Author

dilignt commented Jan 22, 2015

That works - thanks.

On 22 January 2015 at 14:38, Max Klenk notifications@github.com wrote:

You can solve this issue by applying the css attribute position: relative;
to the angular-chart directive. I am currently not sure why it isn't added
by default.


Reply to this email directly or view it on GitHub
#51 (comment)
.

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