The requested page is not available for the requested platform. You are viewing the content for Default platform.

BootstrapUIWidgetBase.SetOptions(options) Method

Sets the widget's options to values specified in the passed object.

Declaration

SetOptions(options: any): void

Parameters

Name Type Description
options any

An object containing key-value pairs specifying new option values.

Remarks

The BootstrapUIWidgetBase class is the base class for various widget's classes. Therefore you can use BootstrapUIWidgetBase's SetOptions method in different ways accordingly to the required descendant.

Chart

BootstrapChart uses the DevExtreme Chart widget as the underlying control. You can set any of the DevExtreme chart's configuration setting using the SetOptions method. For example, to set new axes, use the valueAxis collection with corresponding axis names as an inner parameter of the SetOptions method as follows:

clientChart.SetOptions(
{
    "valueAxis":  [
        {
           name:'axis1'
        },
        {
            name:'axis2'
         }]
});

Range Selector

BootstrapRangeSelector uses the DevExtreme Range Selector widget as the underlying control. You can set any of the DevExtreme range selector's [configuration setting]s (https://js.devexpress.com/Documentation/ApiReference/Data_Visualization_Widgets/dxRangeSelector/) using the SetOptions method. For example, to set a range selector's title, use the title option with a corresponding text as an inner parameter of the SetOptions method as follows:

clientRangeSelector.SetOptions(
{
    "title": {
        "text": "My Range Title"
    }
});

Sparkline

BootstrapSparkline uses the DevExtreme Sparkline widget as the underlying control. You can set any of the DevExtreme sparkline's [configuration setting]s (https://js.devexpress.com/Documentation/ApiReference/Data_Visualization_Widgets/dxSparkline/) using the SetOptions method. For example, to set a color for the boundary of the maximum point, use the maxColor option with a corresponding color and the showMinMax option as inner parameters of the SetOptions method as follows:

clientSparkline.SetOptions(
{
    "maxColor": "red",
    "showMinMax": true
});
See Also