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

[Feature Request] Global default settings #73

Open
38 opened this issue Oct 29, 2019 · 4 comments
Open

[Feature Request] Global default settings #73

38 opened this issue Oct 29, 2019 · 4 comments

Comments

@38
Copy link
Member

38 commented Oct 29, 2019

We need some default global setting, such as default styles for different things, etc.

@TatriX
Copy link
Contributor

TatriX commented Oct 29, 2019

Are you thinking about global shared (optionally mutable) state or more about having config per chart context?

@38
Copy link
Member Author

38 commented Oct 29, 2019

Yes, I am thinking about this for a long time. Currently some of the default values are hardcoded, even tough now we have some robust font configuration. But it seems better if we can globally change the default layout of the any newly created chart.
Any thoughts or concerns ?

@TatriX
Copy link
Contributor

TatriX commented Oct 29, 2019

I think embedding configuration in context object and implementing default for it should do the trick.

@38
Copy link
Member Author

38 commented Oct 29, 2019

Yes, that's nice suggestion. But I really think something may beyond that.

The first time I thought about this is because somebody reports on OSX it doesn't work because FontNotFound error, I want to have a global default fallback font config. But I don't see any motivation for now, especially we have generic font family support and switched to font-kit, a better maintained font loading crate.

But I am stilling thinking another thing: currently we need to call DrawingArea::fill before drawing especially for backend. I think this is a little bit annoying.
Also I feel annoying for each time I need to disable the mesh line, but at the same time I feel a little bit hesitated to turn it off by default.

All this things make me think we should have a global table for configurations - But haven't come up with a concrete idea.

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

2 participants