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 set chart settings? #45

Closed
brayancastrop opened this issue Jan 29, 2016 · 3 comments
Closed

How to set chart settings? #45

brayancastrop opened this issue Jan 29, 2016 · 3 comments

Comments

@brayancastrop
Copy link

I have been looking through ember-c3 options but i have not found how to make use of c3 chart settings, for example
http://c3js.org/reference.html#oninit
http://c3js.org/reference.html#padding-left
and basically any option from the chart section, is there any way to make use of these options?

@maxwondercorn
Copy link
Collaborator

You use the component's padding property

   {{c3-chart` data=data title=title padding=padding}}

and then in a controller setup the padding

/* eslint ember/avoid-leaking-state-in-ember-objects: "off" */
export default Controller.extend({

   padding:  { left: 20 }

});

You will probably need the eslint rule at the top of the controller to eliminate linting errors caused by the object assignment in the controller.

Not sure if you're also asking about the oninit event will be exposed in an upcoming version

@maxwondercorn
Copy link
Collaborator

See issue #77

@maxwondercorn
Copy link
Collaborator

oninit has been exposed in pr #79. Update examples in dummy app show use with closure actions. Update component will be published when issue #77 has been completed

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