iOS & macOS Charting Documentation - SciChart iOS & macOS Charts SDK v4.x

Modify built-in Themes

Maybe you don’t want to create an entire custom theme, but just want to override one color or brush from one of our standard themes or your custom theme.

This can be achieved by adding a special basedOn Property list key to your new theme with the “parent theme name” as a string value.

NOTE: The full list of our standard themes can be found in Styling and Theming article.

As an example let’s take our SCIChartThemeV4Dark theme as a parent one and change few properties there.

First, what you need to do is to create a new Property list file and add basedOn key with your “parent theme name” as a string value.

Next, add the keys you want to override, like this:


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">

Now, you can add and apply your newly created theme as you would do with any Custom Theme:

static SCIChartTheme const MyModifiedTheme = @“MyModifiedTheme”; [SCIThemeManager addTheme:MyModifiedTheme fromBundle:[NSBundle mainBundle]]; [SCIThemeManager applyTheme:MyModifiedTheme toThemeable:self.surface];
extension SCIChartTheme { static let modifiedTheme: SCIChartTheme = SCIChartTheme(rawValue: “MyModifiedTheme”) } SCIThemeManager.addTheme(.modifiedTheme, from: Bundle.main) SCIThemeManager.applyTheme(.modifiedTheme, to: self.surface)
private const string MyModifiedTheme = “MyModifiedTheme”; SCIThemeManager.AddTheme(MyModifiedTheme, Foundation.NSBundle.MainBundle); SCIThemeManager.ApplyTheme(MyModifiedTheme, Surface);

Here is the result:

Modified Theme