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.

exportFromMarkup(markup, options)

Allows you to export widgets using their SVG markup.

Parameters:
markup:

String

The SVG markup of the widgets you need to export.

options:

Object

Export options. Can contain the following fields.

  • fileName - the name of the file to be saved.
  • format - the format of the file to be saved.
    Accepted Values: 'PNG' | 'PDF' | 'JPEG' | 'SVG' | 'GIF'
  • height - the pixel-measured height of the SVG block.
    This field is required.
  • width - the pixel-measured width of the SVG block.
    This field is required.
  • backgroundColor - the color that will fill transparent regions.
  • proxyUrl - the URL of a server-side proxy required for export in IE9 and Safari on Mac OS.
    For details, refer to the proxyUrl option of any widget.
See Also

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 "Chart", "PieChart" and "BarGauge" 
    indicatingSet: ['#90ba58', '#eeba69', '#a37182'], // for "CircularGauge" and "LinearGauge"
    gradientSet: ['#78b6d9', '#eeba69'] // for "VectorMap"
};

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 "Chart", "PieChart" and "BarGauge" 
    indicatingSet: ['#90ba58', '#eeba69', '#a37182'], // for "CircularGauge" and "LinearGauge"
    gradientSet: ['#78b6d9', '#eeba69'] // for "VectorMap"
};

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.