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

Padding can have top/right/bottom/left values #20

Closed
djcarter85 opened this issue Jun 26, 2018 · 3 comments
Closed

Padding can have top/right/bottom/left values #20

djcarter85 opened this issue Jun 26, 2018 · 3 comments
Assignees
Labels

Comments

@djcarter85
Copy link

In Chart.js, chart.options.layout.padding can have 4 values rather than just the one that ChartJSCore supports. Can a new class be added?

@mattosaurus mattosaurus self-assigned this Jun 28, 2018
@mattosaurus
Copy link
Owner

I've added a PaddingObject property to the layout method. As Padding can be either an integer or an object I want to support both and it's either this or make it an object which feels dirtier. If you think this is the best solution let me know and I'll update the NuGet package.

@djcarter85
Copy link
Author

Seems like a good solution to me!
Would be interested to know what happens if you populate both. I imagine the JSON serialization will fail?

@mattosaurus
Copy link
Owner

Yep, the JSON serializer throws an error, I'd say this is probably the correct behavior in these circumstances.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants