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

Apply themes to chart properties #1039

Open
mark-monteiro opened this issue Jun 2, 2023 · 1 comment
Open

Apply themes to chart properties #1039

mark-monteiro opened this issue Jun 2, 2023 · 1 comment

Comments

@mark-monteiro
Copy link

Describe the bug
Defining a theme style for the draw margin using HasRuleForDrawMargin has no effect.

To Reproduce
Steps to reproduce the behavior:

  1. Register and use a theme that makes use of the HasRuleForDrawMargin method
  2. See that charts do not apply the rules to the draw margin from the theme

Expected behavior
The theme should be applied to the DrawMargin

Screenshots
N/A

Desktop (please complete the following information):

  • OS: Windows
  • Browser: N/A
  • Version: 2.0.0-beta.710

Additional context
Other aspects of the theme I have defined are being applied correctly (series, axis, etc), it is just the DrawMargin properties that appear to be ignored.

beto-rodriguez added a commit that referenced this issue Jun 9, 2023
@beto-rodriguez
Copy link
Owner

beto-rodriguez commented Jun 9, 2023

The referenced commit partially fixes this. this will apply themes to existing draw margins, but it cannot create new ones... the problem is actually a little bit bigger; we cannot set any chart property at theme level for now.

You could actually set a draw margin using themes, but you must use WPF themes, the LiveCharts API only sets themes for the drawn objects, this is nice because the same code works for all the supported frameworks.

Maybe we need an API to apply themes to the framework elements of each supported platform? 🤔

@beto-rodriguez beto-rodriguez changed the title DrawMargin style is not applied Apply themes to chart properties Jun 9, 2023
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