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

Why default Chart.js styles are overridden? #189

Closed
ihrankouski opened this issue Sep 7, 2017 · 3 comments
Closed

Why default Chart.js styles are overridden? #189

ihrankouski opened this issue Sep 7, 2017 · 3 comments

Comments

@ihrankouski
Copy link

Why default Chart.js styles are overridden?

I think it's not cool when you run your code and see that your chart looks different compared to the same one in Chart.js docs - then it takes time to find out how to reset the styling to customize the way you want...

@apertureless
Copy link
Owner

Well its more a legacy thing. I created this actually for personal use and set some default styles to save time.

However I don't see a problem overwriting them. Most people will not use the default styles of chart.js

And you see in the repo screenshots how they will look.

@ihrankouski
Copy link
Author

It's not a problem, that's rather a matter of taste and to me, it seems to be an unexpected behavior for a wrapper. Basically I'm ok with default styling and in particular it took some time to find out why grid lines are not getting displayed.

@eddiemf
Copy link

eddiemf commented Oct 28, 2017

I see this as a problem, it took me a good time to figure out what I was doing wrong because the gridLines were not showing, and everywhere in the official docs the gridLines are showing without any configuration. So I searched this and found that it gets overwritten and it's not exposed in the docs or anywhere else.

It's really not a good idea to override default configuration in a wrapper when you depend on the official docs that explicitly says that the display property of the gridLines are true by default (and any other prop that might be overwritten as well).

Or at least make it clear in the docs that you are overriding it (I had to search in source code), so when people see things are not working the way they expect they will quickly figure out that some styles are being overwritten.

Anyways, that's just my opinion :)

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

No branches or pull requests

3 participants