All docs
V20.1
20.1
19.2
The page you are viewing does not exist in version 19.2. This link will take you to the root page.
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

ChartContext Class

Provides a connection between data item containers from the Values section and series from an underlying control.

Declaration

export class ChartContext

Remarks

The following code snippet shows how to use ChartContext to get a Chart item's series:

var Model = DevExpress.Dashboard.Model;

function onItemWidgetOptionsPrepared(args) {
    if(args.dashboardItem instanceof Model.ChartItem) {
        var chartOptions = args.options;
        if(chartOptions.series) {
            chartOptions.series.forEach(function(seriesOptions) {
                var dashboardSeries = args.chartContext.getDashboardItemSeries(seriesOptions)
                if(dashboardSeries && dashboardSeries.plotOnSecondaryAxis()) {
                    seriesOptions.dashStyle = 'longDash';
                }
            })
        }
    }
}

constructor(_dashboardItem)

Initializes a new instance of the ChartContext class with specified settings.

Declaration

constructor(_dashboardItem: ChartItem)

Parameters

Name Type
_dashboardItem ChartItem

Methods

getDashboardItemSeries(seriesOptions) Method

Declaration

getDashboardItemSeries(seriesOptions: DevExpress.viz.ChartSeries): ChartSeries

Parameters

Name Type
seriesOptions ChartSeries

Returns

Type
ChartSeries