SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!

Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.

0
0

Hello everybody,
I am trying to generate a general theme for all charts in all my applications. I first tried using the ResourceDictionary implementation as described in https://www.scichart.com/documentation/v4.x/webframe.html#Creating%20a%20Custom%20Theme.html unfortunatelly this solution does not seem to provide functionalities for changing the default Brush of VerticalLineAnnotations, which is important for my application. So I tried implementing my custom theme using a ThemeColorProvider object, but I can’t find a way to add it to the ThemeManager.

Setting setting the style of each plot manually using IThemeProvider.ApplyTheme(…) is not an option since the theme style of all charts needs to remain configurable via ThemeManager.

Can somebody give me an advice, on how to implement styling of VerticalLineAnnotations in XAML ResourceDictionary or how to add an ThemeColorProvider object to the ThemeManager.

Thanks a lot and regards,
Dirk

Version
v4.0.30319
  • You must to post comments
0
0

Hi Dirk,

In SciChart v4 WPF Themes, the VerticalLineAnnotation pulls the following brushes from the theme:

  • VerticalLineAnnotation.Stroke from IThemeProvider.RubberBandStrokeBrush
  • AnnotationLabel.Background and Border from IThemeProvider.RubberBandStrokeBrush
  • AnnotationLabel.Foreground from VerticalLineAnnotation.Foreground.

So, you can style the verticallineannotation from the IThemeProvider.RubberBandStrokeBrush, or, alternatively, you can specify styles for the VerticalLineAnnotation in application resources by following steps from the VerticalLineAnnotation Documentation.

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.