React Common - utils - viz - Methods
currentPalette(paletteName)
Only the widgets created after calling this method use the new palette. Refresh the styling settings in other widgets using the DevExpress.viz.refreshTheme() method.
See Also
currentTheme()
Gets the current theme's name.
currentTheme(platform, colorScheme)
Changes the current theme for all data visualization widgets on the page. The color scheme is defined separately.
Only the widgets created after calling this method use the new theme. Refresh the styling settings in other widgets using the DevExpress.viz.refreshTheme() method.
See Also
currentTheme(theme)
Only the widgets created after calling this method use the new palette. Refresh the styling settings in other widgets using the DevExpress.viz.refreshTheme() method.
See Also
exportFromMarkup(markup, options)
Name | Type | Description |
---|---|---|
fileName |
The name of the file to be saved. |
|
format |
The file's format. One of 'PNG', 'PDF', 'JPEG', 'SVG' and 'GIF'. |
|
backgroundColor |
The color that fills transparent regions. |
|
proxyUrl |
The URL of a server-side proxy required for export in IE9 and Safari on Mac OS. See proxyUrl for details. |
|
width |
The SVG block's width in pixels. This field is required. |
|
height |
The SVG block's height in pixels. This field is required. |
|
onExporting |
Allows you to request exporting details and prevent exporting.
|
|
onExported |
Allows you to notify a user when exporting completes. |
|
onFileSaving |
Allows you to access exported data and/or prevent it from being saved into a file on the user's local storage.
|
getMarkup(widgetInstances)
The widgets' SVG markup. Pass it to the exportFromMarkup(markup, options) method to export the widgets.
getPalette(paletteName)
The returned value is an object of the following structure.
{ simpleSet: ['#60a69f', '#78b6d9', '#6682bb', '#a37182', '#eeba69'], // for "Chart", "PieChart", "BarGauge", "Funnel", // and "TreeMap" with a gradient or range colorizer indicatingSet: ['#90ba58', '#eeba69', '#a37182'], // for "CircularGauge" and "LinearGauge" gradientSet: ['#78b6d9', '#eeba69'] // for "VectorMap" and "TreeMap" with a gradient or range colorizer }
The built-in palettes are listed in the Appearance Customization topic.
getTheme(theme)
Gets a predefined or registered theme's settings.
refreshPaths()
The method to be called every time the active entry in the browser history is modified without reloading the current page.
Each data visualization widget addresses its inner elements by their URLs. Those URLs break when the active history entry is modified without reloading the current page (see Adding and modifying history entries). As a result, some widget elements may get mixed up or disappear completely. To fix the URLs, call the refreshPaths() method right after the history entry modification, and in the onpopstate event handler or, if you use a routing library, in its counterpart.
window.history.pushState({ foo: "bar" }, "title", "?foo=bar"); DevExpress.viz.refreshPaths(); window.onpopstate = function(event) { DevExpress.viz.refreshPaths(); }
The problem with broken URLs may also emerge if the page uses a path modifying HTML tag; for example, <base>
or <iframe>
. To resolve it, set the pathModified option of the widget to true.
registerPalette(paletteName, palette)
The palette settings is an object of the following structure.
{ simpleSet: ['#60a69f', '#78b6d9', '#6682bb', '#a37182', '#eeba69'], // for "Chart", "PieChart", "BarGauge", "Funnel", // and "TreeMap" with a gradient or range colorizer indicatingSet: ['#90ba58', '#eeba69', '#a37182'], // for "CircularGauge" and "LinearGauge" gradientSet: ['#78b6d9', '#eeba69'] // for "VectorMap" and "TreeMap" with a gradient or range colorizer }
registerTheme(customTheme, baseTheme)
For details on how to customize a theme, refer to the Appearance Customization article.
If you have technical questions, please create a support ticket in the DevExpress Support Center.