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!

1
0

Please help to provide a tutorial example to implement IThemeProvider interface in order to make a custom theme.

Thanks,
Tanmay

  • You must to post comments
1
0

Hi Tanmay,

Thanks for your inquiry. Actually, we are going to introduce the capability to add custom themes in SciChart v3.2.

In the meantime, there is a workaround to customize themes now. You need to call ThemeManager.GetThemeProvider and get the ThemeColorProvider for a particular theme and just apply your desired values. Please, take a look at the following code:

// Pass "" or "ExpressionDark" to change the color scheme of the default theme. 
// To change schemes of the other standard themes, pass in corresponding name.

ThemeColorProvider tcp = ThemeManager.GetThemeProvider("");

tcp.GridBackgroundBrush = Brushes.White;
tcp.GridBorderBrush = App.ColorToBrushConverter("#FFF0F0F0");
tcp.SciChartBackground = Brushes.White;
tcp.MajorGridLinesBrush = App.ColorToBrushConverter("#FFF0F0F0");
tcp.MinorGridLinesBrush = App.ColorToBrushConverter("#FFF0F0F0");
tcp.TickTextBrush = App.ColorToBrushConverter("#FF818181");
tcp.RolloverLineStroke = App.ColorToBrushConverter("#A49CA9B6");
tcp.DefaultAxisMarkerAnnotationBackground = Brushes.Black;
tcp.DefaultAxisMarkerAnnotationForeground = Brushes.White;

UPDATE Nov 2014

We now have a ThemeProvider example over at the article titled How to Create a Custom Theme for SciChart

enter image description here

Hope this helps!

  • Mathias Vanden Auweele
    What is 'app' in this example?
  • Andrew
    It doesn't matter. basically you need to assign a SolidColorBrush to GridBorderBrush with hex code equal to #FFF0F0F0 (etc)... hope that helps :)
  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.