viz Methods

This section describes the methods exposed by the DevExpress.viz namespace.

currentPalette(paletteName)

Applies a predefined or registered custom palette to all visualization widgets at once.

Parameters:
paletteName: String
The palette name.

currentTheme(platform, colorScheme)

Applies a new theme (with the color scheme defined separately) for the entire page with several DevExtreme visualization widgets.

Parameters:
platform: String
The platform name or 'generic'.
colorScheme: String
The color scheme (can be 'light' or 'dark').

For details on how to apply a theme using this method, refer to the Appearance Customization article.

currentTheme(theme)

Applies a theme for the entire page with several DevExtreme visualization widgets.

Parameters:
theme: String
The name of a new theme.

For details on how to apply a theme using this method, refer to the Appearance Customization article.

getPalette(paletteName)

Obtains the color sets of a predefined or registered palette.

Parameters:
paletteName: String
The palette name.
Return Value: Object
The palette settings.

The returned value is an object of the following structure.

JavaScript
{
    simpleSet: ['#60a69f', '#78b6d9', '#6682bb', '#a37182', '#eeba69'], // for dxChart, dxPieChart and dxBarGauge 
    indicatingSet: ['#90ba58', '#eeba69', '#a37182'], // for dxCircularGauge and dxLinearGauge
    gradientSet: ['#78b6d9', '#eeba69'] // for dxVectorMap
};

The built-in palettes are listed in the Appearance Customization topic.

registerPalette(paletteName, palette)

Registers a new palette.

Parameters:
paletteName: String
The new palette name.
palette: Object
The new palette settings.

The palette settings is an object of the following structure.

JavaScript
{
    simpleSet: ['#60a69f', '#78b6d9', '#6682bb', '#a37182', '#eeba69'], // for dxChart, dxPieChart and dxBarGauge 
    indicatingSet: ['#90ba58', '#eeba69', '#a37182'], // for dxCircularGauge and dxLinearGauge
    gradientSet: ['#78b6d9', '#eeba69'] // for dxVectorMap
};

registerTheme(customTheme, baseTheme)

Registers a new theme based on the existing one.

Parameters:
customTheme: Object
The new theme settings.
baseTheme: String
The base theme name.

For details on how to customize a theme, refer to the Appearance Customization article.