# Function ThemeProvider

ThemeProvider(props, deprecatedLegacyContext?): null | ReactElement< any, any >

Theme provider, which allows you to adjust the look and feel of child components.

# Parameters

Parameter Type Description
props ThemeProviderProps Theme provider props
deprecatedLegacyContext? any ::: warning Deprecated

:::

See

React Docs (opens new window)

# Returns

null | ReactElement< any, any >

A Theme Provider component

# Example

Example of a theme provider, which changes the colors and font of the nested indicator chart:

<ThemeProvider
  theme={{
    chart: {
      backgroundColor: '#333333',
      textColor: 'orange',
      secondaryTextColor: 'purple',
    },
    typography: {
      fontFamily: 'impact',
    },
  }}
>
  <IndicatorChart {...chartOptions} />
</ThemeProvider>

Indicator chart with custom theme settings:

For comparison, indicator chart with default theme settings:

# See

ThemeSettings and IndicatorChart