Chart Configuration

An object defining configuration options for the dxChart widget.

adaptiveLayout

Specifies adaptive layout options.

Type: Object

When your scenario provides the capability to change the size of the widget, it may become too small for displaying all of widget's elements. In this case, the adaptive layout removes accessory widget elements, thus saving space for the most important ones. The elements are being removed in the following sequence.

  1. Title
  2. Legend
  3. Axis titles
  4. Axis labels
  5. Point labels (can be saved by setting the adaptiveLayout | keepLabels option to true)

To specify the widget's size to be small enough for the layout to begin adapting, use the height and width options of the adaptiveLayout object.

adjustOnZoom

Indicates whether or not to adjust a value axis to the current minimum and maximum values of a zoomed chart.

Type: Boolean
Default Value: true

You can use the dxRangeSelector widget to perform zooming on the dxChart widget. In such an instance, the range selector and chart will have the same argument scale (axis). When an end-user selects a range in the range selector, the chart displays this range in the argument axis and the corresponding series part only. The adjustOnZoom property determines whether or not to change the value axis' visible range, so that its minimum and maximum values correspond to the values of the lowest and highest points of the currently visible series part. To learn how to implement chart zooming using a range selector, refer to the Zooming and Scrolling Using dxRangeSelector topic.

NOTE: The adjustOnZoom option is not supported when the argument axis is discrete.

Show Example:
jQuery

In the following example, the dxRangeSelector widget is used to perform zooming on a Chart. You can see the adjusting of the value axis' labels while sliding the markers of the range selector. Use the check box in the bottom to set the adjustOnZoom option to false. In this instance, the Chart's value axis will not be adjusted.

<div id="chartContainer" style="height: 350px;max-width:800px;margin: 0px auto"></div>
<div id="rangeSelectorContainer" style="height: 150px;max-width:800px;margin: 0px auto"></div>
<div id="checkboxContainer" style="height:40px;max-width:150px;margin:5px auto;font-family:'Trebuchet MS',Arial,sans-serif;font-size:14px">
    <input type="checkbox" id="adjustOnZoomCheckbox" checked> adjustOnZoom
</div>
var dataSource = [
    { arg: 10, y1: -12, y2: 10, y3: 32 },
    { arg: 20, y1: -32, y2: 30, y3: 12 },
    { arg: 40, y1: -20, y2: 20, y3: 30 },
    { arg: 50, y1: -39, y2: 50, y3: 19 },
    { arg: 60, y1: -10, y2: 10, y3: 15 },
    { arg: 75, y1: 10, y2: 10, y3: 15 },
    { arg: 80, y1: 30, y2: 100, y3: 130 },
    { arg: 90, y1: 40, y2: 110, y3: 140 },
    { arg: 100, y1: 50, y2: 90, y3: 90 },
    { arg: 105, y1: 40, y2: 145, y3: 120 },
    { arg: 110, y1: -12, y2: 10, y3: 32 },
    { arg: 120, y1: -32, y2: 30, y3: 12 },
    { arg: 130, y1: -20, y2: 20, y3: 30 },
];

var series = [{
    argumentField: 'arg',
    valueField: 'y1'
}, {
    argumentField: 'arg',
    valueField: 'y2'
}, {
    argumentField: 'arg',
    valueField: 'y3'
}];

$(function () {
    $("#chartContainer").dxChart({
        argumentAxis: {
            indentFromMin: 0.02,
            indentFromMax: 0.02
        },
        dataSource: dataSource,
        series: series,
        legend: {
            visible: false
        },
        adjustOnZoom: true
    }).dxChart('instance').zoomArgument(10, 20);

    $("#rangeSelectorContainer").dxRangeSelector({
        size: {
            height: 120
        },
        margin: {
            left: 10
        },
        scale: {
            divisionValue: 1,
            minRange: 2
        },
        selectedRange: {
            startValue: 10, endValue: 20
        },
        dataSource: dataSource,
        chart: {
            series: series
        },
        behavior: {
            callSelectedRangeChanged: "onMoving"
        },
        onSelectedRangeChanged: function (e) {
            var zoomedChart = $("#chartContainer").dxChart('instance');
            zoomedChart.zoomArgument(e.startValue, e.endValue);
        }
    });

    $("#adjustOnZoomCheckbox").change(function () {
        var chart = $("#chartContainer").dxChart("instance");
        chart.option("adjustOnZoom", this.checked);
    });
});

animation

Specifies animation options.

Type: Object|Boolean

To make your chart "live", enable animation for it. To do this, set the enabled option of the animation object to true. In this instance, the chart series will appear in motion. The animation object provides more options to set up chart animation. Refer to their description for details.

Show Example:
jQuery

In the example below, the animation's duration option is altered to 2000 milliseconds and the type of easing is set to linear.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { arg: 10, y1: -12, y2: 10, y3: 32 },
    { arg: 20, y1: -32, y2: 30, y3: 12 },
    { arg: 40, y1: -20, y2: 20, y3: 30 },
    { arg: 50, y1: -39, y2: 50, y3: 19 },
    { arg: 60, y1: -10, y2: 10, y3: 15 },
    { arg: 75, y1: 10, y2: 10, y3: 15 },
    { arg: 80, y1: 30, y2: 100, y3: 130 },
    { arg: 90, y1: 40, y2: 110, y3: 140 },
    { arg: 100, y1: 50, y2: 90, y3: 90 },
    { arg: 105, y1: 40, y2: 145, y3: 120 },
    { arg: 110, y1: -12, y2: 10, y3: 32 },
    { arg: 120, y1: -32, y2: 30, y3: 12 },
    { arg: 130, y1: -20, y2: 20, y3: 30 },
];

$(function () {
    $("#chartContainer").dxChart({
        commonSeriesSettings: {
            argumentField: 'arg'
        },
        argumentAxis: {
            indentFromMin: 0.02,
            indentFromMax: 0.02
        },
        dataSource: dataSource,
        series: [{
            valueField: 'y1'
        }, {
            valueField: 'y2'
        }, {
            valueField: 'y3'
        }],
        legend: {
            visible: false
        },
        animation: {
            duration: 2000,
            easing: 'linear'
        }
    });
});

argumentAxis

Specifies argument axis options for the dxChart widget.

Type: Object

For charting, the rectangular coordinate system is used to determine each point uniquely on a plane through two numbers, the argument and the value of the point. Two perpendicular directed lines (the axis of arguments and the axis of values) are specified to define the coordinates. To define the argument axis, use the argumentAxis configuration object. To define the value axis (axes), use the valueAxis configuration object. To set the properties of all axes to a common value, use the commonAxisSettings configuration object. This object exposes the properties that can be specified for all axes simultaneously. Note that the value specified for an axis individually (in the argumentAxis or valueAxis object) overrides the value specified in the commonAxisSettings object.

Show Example:
jQuery

This example shows the argument axis of a discrete type. Here the axis is ordered by categories, divided using the 'crossLabels' mode and moved to the top of the chart. In addition, the grid lines of the axis are made visible.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        argumentAxis: {
            type: 'discrete',
            categories: [1950, 1960, 1970, 1980, 1990, 2000, 2010, 2020, 2030, 2040, 2050],
            position: 'top',
            grid: { visible: true },
            discreteAxisDivisionMode: 'crossLabels'
        }
    });
});

barWidth

Specifies a common bar width as a percentage from 0 to 1.

Type: Number
Default Value: undefined

Works only if the equalBarWidth option is set to true.

commonAxisSettings

An object defining the configuration options that are common for all axes of the dxChart widget.

Type: Object

Use this object's properties to set the options for all chart axes at once. The option values will be applied to the argument axis and all values axes, which are defined in the valueAxis array. To set a common axis option for an axis individually, use the corresponding valueAxis or argumentAxis object. Values that are set individually override their corresponding common values.

Show Example:
jQuery

Here, the color and width options are changed for both axes.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        commonAxisSettings: {
            visible: true,
            color: 'black',
            width: 2
        }
    });
});

commonPaneSettings

An object defining the configuration options that are common for all panes in the dxChart widget.

Type: Object

Use this object's properties to set options for all panes at once. If you need to set an individual value for a common option, use the corresponding pane object within the panes array. The values that are set individually override the corresponding common values.

Show Example:
jQuery

In this example, the panes of a multi-pane chart are separated one from another by a border colored in blue.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { month: 'January', avgT: 9.8, minT: 4.1, maxT: 15.5, prec: 109 },
    { month: 'February', avgT: 11.8, minT: 5.8, maxT: 17.8, prec: 104 },
    { month: 'March', avgT: 13.4, minT: 7.2, maxT: 19.6, prec: 92 },
    { month: 'April', avgT: 15.4, minT: 8.1, maxT: 22.8, prec: 30 },
    { month: 'May', avgT: 18, minT: 10.3, maxT: 25.7, prec: 10 },
    { month: 'June', avgT: 20.6, minT: 12.2, maxT: 29, prec: 2 },
    { month: 'July', avgT: 22.2, minT: 13.2, maxT: 31.3, prec: 2 },
    { month: 'August', avgT: 22.2, minT: 13.2, maxT: 31.1, prec: 1 },
    { month: 'September', avgT: 21.2, minT: 12.4, maxT: 29.9, prec: 8 },
    { month: 'October', avgT: 17.9, minT: 9.7, maxT: 26.1, prec: 24 },
    { month: 'November', avgT: 12.9, minT: 6.2, maxT: 19.6, prec: 64 },
    { month: 'December', avgT: 9.6, minT: 3.4, maxT: 15.7, prec: 76 },
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'month'
        },
        panes: [
            { name: 'topPane' },
            { name: 'bottomPane', border: { visible: false } }
        ],
        commonPaneSettings: {
            border: {
                visible: true,
                left: false,
                right: false,
                top: false,
                color: 'blue'
            }
        },
        series: [{
            pane: 'topPane',
            type: 'rangeArea',
            rangeValue1Field: 'minT',
            rangeValue2Field: 'maxT',
            name: 'Monthly Temperature Ranges, °C'
        }, {
            pane: 'topPane',
            valueField: 'avgT',
            name: 'Average Temperature, °C'
        }, {
            type: 'bar',
            valueField: 'prec',
            name: 'prec, mm'
        }
        ],
        valueAxis: [
          { pane: 'bottomPane', grid: { visible: true } },
          { pane: 'topPane', grid: { visible: true } }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

commonSeriesSettings

An object defining the configuration options that are common for all series of the dxChart widget.

Type: Object

Use this object's properties to set options for all chart series at once. These can be options common to all series types and options specific to series types.

If you have several series of one type, you can set options to the values specific to this series type using the corresponding object (area, line or another) within the commonSeriesSettings configuration object. The values that are set within type-specific configuration objects override the corresponding common values.

In case you have to set an option for an individual series, use the corresponding series object within the series array. The values that are set individually override the corresponding common values.

Show Example:
jQuery

In this example, the chart type and the argument field options are set for all series at once using the commonSeriesSettings.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: '1850', africa: 111000000, asia: 809000000, europe: 276000000, latinamerica: 38000000, northamerica: 26000000, oceania: 2000000, total: 1262000000 },
    { year: '1900', africa: 133000000, asia: 947000000, europe: 408000000, latinamerica: 74000000, northamerica: 82000000, oceania: 6000000, total: 1650000000 },
    { year: '1950', africa: 229895000, asia: 1403388000, europe: 547287000, latinamerica: 167368000, northamerica: 171614000, oceania: 12675000, total: 2532227000 },
    { year: '2000', africa: 811101000, asia: 3719044000, europe: 726777000, latinamerica: 521419000, northamerica: 313289000, oceania: 31130000, total: 6122770000 },
    { year: '2050', africa: 2191599000, asia: 5142220000, europe: 719257000, latinamerica: 750956000, northamerica: 446862000, oceania: 55223000, total: 9306128000 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'stackedbar'
        },
        series: [{
            valueField: 'africa',
            name: 'Africa'
        }, {
            valueField: 'asia',
            name: 'Asia'
        }, {
            valueField: 'europe',
            name: 'Europe'
        }, {
            valueField: 'latinamerica',
            name: 'Latin Am. &amp; Caribbean'
        }, {
            valueField: 'northamerica',
            name: 'Northern America'
        }, {
            valueField: 'oceania',
            name: 'Oceania'
        }, {
            type: 'spline',
            valueField: 'total',
            name: 'Total',
            color: 'blue'
        }
        ],
        valueAxis: {
            label: {
                format: 'largeNumber'
            },
            min: 0
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

containerBackgroundColor

Specifies the color of the parent page element.

Type: String
Default Value: '#FFFFFF'

If you set this property to the color of the parent page element, certain chart elements will use this color to coordinate with the page. For example, hovered points in the dxChart widget are painted in the color that is set to this property, but you can change this color to a custom color (see color).

Show Example:
jQuery

Here, the containerBackgroundColor option is changed to 'crimson'. To see the changes, hover over any point on the chart.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { arg: 10, y1: -12, y2: 10, y3: 32 },
    { arg: 20, y1: -32, y2: 30, y3: 12 },
    { arg: 40, y1: -20, y2: 20, y3: 30 },
    { arg: 50, y1: -39, y2: 50, y3: 19 },
    { arg: 60, y1: -10, y2: 10, y3: 15 },
    { arg: 75, y1: 10, y2: 10, y3: 15 },
    { arg: 80, y1: 30, y2: 100, y3: 130 },
    { arg: 90, y1: 40, y2: 110, y3: 140 },
    { arg: 100, y1: 50, y2: 90, y3: 90 },
    { arg: 105, y1: 40, y2: 145, y3: 120 },
    { arg: 110, y1: -12, y2: 10, y3: 32 },
    { arg: 120, y1: -32, y2: 30, y3: 12 },
    { arg: 130, y1: -20, y2: 20, y3: 30 },
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'arg'
        },
        series: [{
            valueField: 'y1'
        }, {
            valueField: 'y2'
        }, {
            valueField: 'y3'
        }],
        legend: {
            visible: false
        },
        containerBackgroundColor: 'crimson'
    });
});

crosshair

An object that specifies the appearance options of the chart crosshair.

Type: Object

Crosshair is a pointer, which is represented by two mutually-crossing lines stretched over the entire chart plot. The crosshair helps you identify the values of the series points more precisely. When the crosshair is enabled, its center snaps to hovered points. To enable the crosshair, set the enabled option within the crosshair configuration object to true.

Use the crosshair configuration object to specify options for both of the crosshair lines. To set the options for the horizontal or vertical crosshair line individually, specify these options within the crosshair | horizontalLine or crosshair | verticalLine object correspondingly.

View Demo

Show Example:
jQuery

In this example, the horizontal and vertical crosshair lines have a different color and dash style. In addition, the opacity of both crosshair lines is changed to 0.8.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 },
    { year: 1950, europe: 546, americas: 332, africa: 227 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        crosshair: {
            enabled: true,
            horizontalLine: {
                color: 'skyblue',
                dashStyle: 'longDash'
            },
            verticalLine: {
                color: 'limegreen',
                dashStyle: 'dotdashdot'
            },
            opacity: 0.8
        }
    });
});

customizeLabel

Specifies a callback function that returns an object with options for a specific point label.

Type: function(labelInfo)
Function parameters:
labelInfo: Object
Information on the label to be customized.
Return Value: Label configuration
A configuration object for the label.

By default, all point labels on a chart are displayed identically. But you can specify a different appearance for certain labels using the customizeLabel field. Assign a function to this field. This function should return an object with options that should be changed for a certain label. Refer to the label object description to learn about the options that can be changed.

When implementing a callback function for this option, you can access the following fields of the function's parameter.

  • argument
    Represents the argument of the label's point.
  • value
    Represents the value of the label's point.
  • tag
    Represents the tag of the label's point.
  • seriesName
    Represents the name of the series to which the label's point belongs.
  • index
    Represents the index of the label's point in the points array.

In the range bar and range area series, the following fields of the function's parameter can be accessed instead of the value field.

  • rangeValue1
    Represents the first value of the label's point.
  • rangeValue2
    Represents the second value of the label's point.

In the candle stick and stock series, the following fields of the function's parameter can be accessed instead of the value field.

  • openValue
    Represents the open value of the label's point.
  • closeValue
    Represents the close value of the label's point.
  • lowValue
    Represents the low value of the label's point.
  • highValue
    Represents the high value of the label's point.
  • reductionValue
    Represents the reduction value of the label's point.

In addition, these values can be accessed using the this object.

View Demo

Show Example:
jQuery

This example shows how to customize point labels using the customizeLabel option. On this chart, if the argument of a point is greater than 20, the label of this point is colored in 'darkorange'.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { temperature: 14.2, sales: 215 },
    { temperature: 16.4, sales: 325 },
    { temperature: 11.9, sales: 185 },
    { temperature: 15.2, sales: 332 },
    { temperature: 18.5, sales: 406 },
    { temperature: 22.1, sales: 522 },
    { temperature: 19.4, sales: 412 },
    { temperature: 25.1, sales: 614 },
    { temperature: 23.4, sales: 544 },
    { temperature: 22.6, sales: 445 },
    { temperature: 17.2, sales: 408 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'temperature',
            label: { visible: true }
        },
        series: {
            valueField: 'sales',
            argumentField: 'temperature',
            name: 'Ice Cream Sales',
            color: 'royalblue'
        },
        customizeLabel: function(point) {
            if (point.argument > 20) {
                return { backgroundColor: 'darkorange' }
            }
        },
        title: 'Ice Cream Sales vs Temperature',
        legend: { visible: false }
    });
});

customizePoint

Specifies a callback function that returns an object with options for a specific point.

Type: function(pointInfo)
Function parameters:
pointInfo: Object
Information on the point to be customized
Return Value: Point configuration
A configuration object for the point

By default, all points on a chart are displayed identically. But you can specify different appearance for certain points using the customizePoint field. Assign a function to this field. This function should return an object with options that must be changed for a specific point. Refer to the point object description to learn about the options that can be changed.

NOTE: The hoverMode and selectionMode options cannot be changed using the customizePoint option.

When implementing a callback function for this option, use the argument or value of a point. They can be accessed using the following fields of the function's parameter.

  • argument
    Represents the argument of the point.
  • value
    Represents the value of the point.
  • tag
    Represents the tag of the point.
  • seriesName
    Represents the name of the series to which the point belongs.
  • index
    Represents the index of the point in the points array.

In the range bar and range area series, the following fields of a point can be accessed instead of the value field.

  • rangeValue1
    Represents the first value of the point.
  • rangeValue2
    Represents the second value of the point.

In the candle stick and stock series, the following fields of the function's parameter can be accessed instead of the value field.

  • openValue
    Represents the open value of the label's point.
  • closeValue
    Represents the close value of the label's point.
  • lowValue
    Represents the low value of the label's point.
  • highValue
    Represents the high value of the label's point.
  • reductionValue
    Represents the reduction value of the label's point.

In addition, these values can be accessed using the this object.

Refer to our Visualization Gallery to see the demo.

View Demo

Show Example:
jQuery

This example shows how to customize series points using the customizePoint option. On this chart, if the argument of a point is greater than 20, this point is colored in 'darkorange', otherwise — 'royalblue'.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { temperature: 14.2, sales: 215 },
    { temperature: 16.4, sales: 325 },
    { temperature: 11.9, sales: 185 },
    { temperature: 15.2, sales: 332 },
    { temperature: 18.5, sales: 406 },
    { temperature: 22.1, sales: 522 },
    { temperature: 19.4, sales: 412 },
    { temperature: 25.1, sales: 614 },
    { temperature: 23.4, sales: 544 },
    { temperature: 22.6, sales: 445 },
    { temperature: 17.2, sales: 408 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'temperature',
            label: { visible: true }
        },
        series: {
            valueField: 'sales',
            argumentField: 'temperature',
            name: 'Ice Cream Sales'
        },
        customizePoint: function (point) {
            if (point.argument > 20)
                return { color: 'darkorange' }
            else
                return { color: 'royalblue' }
        },
        title: 'Ice Cream Sales vs Temperature',
        legend: { visible: false }
    });
});

dataPrepareSettings

An object providing options for managing data from a data source.

Type: Object

When values from a data source are of a different type, they may be displayed incorrectly on a chart. To resolve this situation, use the options provided by the dataPrepareSettings configuration object. You can enable/disable data validation using the checkTypeForAllData option, or specify whether or not to convert the data source values to the type of the axis using the convertToAxisDataType option. In addition, you can sort the series points using the sortingMethod option.

Show Example:
jQuery

In this example, the data source has values of different types. These value types are checked and converted into the axis type as the checkTypeForAllData and convertToAxisDataType options are set to true. In addition, the series points are sorted in descending order by values using the function assigned to the sortingMethod option.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { arg: 1, val: 5 },
    { arg: '6', val: 8 },
    { arg: 3.5, val: '4' },
    { arg: 'r', val: 10 },
    { arg: '8.4', val: '8.5' }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'arg',
            type: 'spline'
        },
        series: [{ valueField: 'val' }],
        dataPrepareSettings: {
            checkTypeForAllData: true,
            convertToAxisDataType: true,
            sortingMethod: function (a, b) {
                return a.val - b.val;
            }
        }
    });
});

dataSource

Specifies a data source for the chart.

Cannot be used in themes.

To provide data for a chart, introduce an array of objects. These objects must contain a property representing an argument value and property(ies) representing the value(s) that corresponds to that argument in each series. Assign this array to the dataSource property. In addition, specify which data source field must be used as a source for arguments and which one(s) as a source for values. To do this, use the argumentField and valueField properties of the series object. For details, refer to the Data Binding topic.

Show Example:
jQuery

In this example, the data source is declared as an array of objects that each contain the 'arg', 'y1', 'y2' and 'y3' fields. The 'arg' field is used as an argument field for all series. The other fields are used as value fields for each series respectively.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { arg: 10, y1: -12, y2: 10, y3: 32 },
    { arg: 20, y1: -32, y2: 30, y3: 12 },
    { arg: 40, y1: -20, y2: 20, y3: 30 },
    { arg: 50, y1: -39, y2: 50, y3: 19 },
    { arg: 60, y1: -10, y2: 10, y3: 15 },
    { arg: 75, y1: 10, y2: 10, y3: 15 },
    { arg: 80, y1: 30, y2: 100, y3: 130 },
    { arg: 90, y1: 40, y2: 110, y3: 140 },
    { arg: 100, y1: 50, y2: 90, y3: 90 },
    { arg: 105, y1: 40, y2: 145, y3: 120 },
    { arg: 110, y1: -12, y2: 10, y3: 32 },
    { arg: 120, y1: -32, y2: 30, y3: 12 },
    { arg: 130, y1: -20, y2: 20, y3: 30 },
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'arg'
        },
        series: [{
            valueField: 'y1'
        }, {
            valueField: 'y2'
        }, {
            valueField: 'y3'
        }]
    });
});

defaultPane

Specifies a default pane for the chart series.

Type: String
Default Value: undefined
Cannot be used in themes.

When there are several panes declared, be sure to specify on which pane each series must be displayed. If a pane is not specified for a series, the series is displayed on a default pane. The default pane is specified by the chart's defaultPane property. If you do not specify this property, the last pane in the panes array is considered the default.

Show Example:
jQuery

In this example, the 'topPane' pane is declared as the default pane using the defaultPane option. Thus, series that do not have a pane specified are displayed on the default pane.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { month: 'January', avgT: 9.8, minT: 4.1, maxT: 15.5, prec: 109 },
    { month: 'February', avgT: 11.8, minT: 5.8, maxT: 17.8, prec: 104 },
    { month: 'March', avgT: 13.4, minT: 7.2, maxT: 19.6, prec: 92 },
    { month: 'April', avgT: 15.4, minT: 8.1, maxT: 22.8, prec: 30 },
    { month: 'May', avgT: 18, minT: 10.3, maxT: 25.7, prec: 10 },
    { month: 'June', avgT: 20.6, minT: 12.2, maxT: 29, prec: 2 },
    { month: 'July', avgT: 22.2, minT: 13.2, maxT: 31.3, prec: 2 },
    { month: 'August', avgT: 22.2, minT: 13.2, maxT: 31.1, prec: 1 },
    { month: 'September', avgT: 21.2, minT: 12.4, maxT: 29.9, prec: 8 },
    { month: 'October', avgT: 17.9, minT: 9.7, maxT: 26.1, prec: 24 },
    { month: 'November', avgT: 12.9, minT: 6.2, maxT: 19.6, prec: 64 },
    { month: 'December', avgT: 9.6, minT: 3.4, maxT: 15.7, prec: 76 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'month'
        },
        panes: [
            { name: 'topPane' },
            { name: 'bottomPane' }
        ],
        defaultPane: 'topPane',
        series: [{
            type: 'rangeArea',
            rangeValue1Field: 'minT',
            rangeValue2Field: 'maxT',
            name: 'Monthly Temperature Ranges, °C'
        }, {
            valueField: 'avgT',
            name: 'Average Temperature, °C'
        }, {
            pane: 'bottomPane',
            type: 'bar',
            valueField: 'prec',
            name: 'prec, mm'
        }
        ],
        valueAxis: [
            { pane: 'bottomPane', grid: { visible: true } },
            { pane: 'topPane', grid: { visible: true } }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

equalBarWidth

Specifies whether all bars in a series must have the same width, or may have different widths if any points in other series are missing.

Type: Boolean
Default Value: true

If some values for a series are set to zero or not specified, bars that represent these values will be missing from the chart. To fill the empty area by extending the width of the neighboring bars, set the equalBarWidth property to false. The bars will have different widths, but there will be no empty areas.

To set a custom width for bars, as well as the spacing between bars, use the barWidth option.

If the widget's container is not large enough to contain bars of the specified width along with the specified spacing between them, the spacing will be ignored.

View Demo

legend

Specifies the options of a chart's legend.

Type: Object

The dxChart widget can include a legend - an explanatory component that helps you identify a series. Each series is represented by an item on a Legend. An item marker identifies the series color. An item label displays the series title. To set the required position for a legend and its items, to customize the font settings for item labels, and to specify the size of item markers, use the properties of the legend configuration object. To learn more on the legend and its options, refer to the Legend topic.

Show Example:
jQuery

In this example, the legend's horizontalAlignment and verticalAlignment options are changed.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: '1850', africa: 111000000, asia: 809000000, europe: 276000000, latinamerica: 38000000, northamerica: 26000000, oceania: 2000000, total: 1262000000 },
    { year: '1900', africa: 133000000, asia: 947000000, europe: 408000000, latinamerica: 74000000, northamerica: 82000000, oceania: 6000000, total: 1650000000 },
    { year: '1950', africa: 229895000, asia: 1403388000, europe: 547287000, latinamerica: 167368000, northamerica: 171614000, oceania: 12675000, total: 2532227000 },
    { year: '2000', africa: 811101000, asia: 3719044000, europe: 726777000, latinamerica: 521419000, northamerica: 313289000, oceania: 31130000, total: 6122770000 },
    { year: '2050', africa: 2191599000, asia: 5142220000, europe: 719257000, latinamerica: 750956000, northamerica: 446862000, oceania: 55223000, total: 9306128000 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'stackedbar'
        },
        series: [
            { valueField: 'africa', name: 'Africa' },
            { valueField: 'asia', name: 'Asia' },
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'latinamerica', name: 'Latin Am. &amp; Caribbean' },
            { valueField: 'northamerica', name: 'Northern America' },
            { valueField: 'oceania', name: 'Oceania' },
            {
                valueField: 'total',
                name: 'Total',
                type: 'spline',
                color: 'blue'
            }
        ],
        valueAxis: {
            label: {
                format: 'largeNumber'
            },
            min: 0
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

loadingIndicator

Specifies the appearance of the loading indicator.

Type: Object

Usually, the widget is quick enough to draw itself instantly for a viewer. There are, however, cases, when the widget takes longer to be drawn. In such cases, displaying the loading indicator is recommended. To display the loading indicator, assign true to the show field of the loadingIndicator object. Use other fields of this object to change the appearance of the loading indicator.

Show Example:
jQuery

In this example, the data source is assigned to the chart 3000 ms after the example is loaded. Until that time, the loading indicator is displayed. Its background and font are changed using the backgroundColor and font options respectively.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var data = [
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 },
    { year: 1950, europe: 546, americas: 332, africa: 227 }
];

var dataSource = new DevExpress.data.DataSource({
    load: function (loadOptions) {
        var d = $.Deferred();
        setTimeout(function () {
            d.resolve(data);
        }, 3000);
        return d.promise();
    },
});

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            label: {
                visible: true,
                connector: { visible: true }
            }
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        loadingIndicator: {
            show: true,
            backgroundColor: 'lightcyan',
            font: {
                weight: 700,
                size: 16
            }
        }
    });
});

margin

Specifies the blank space between the chart's extreme elements and the boundaries of the area provided for the widget (see size) in pixels.

Type: Object

Set the required values for the left, right, top and bottom margins using the corresponding properties of the margin object.

ChartMargin ChartJS

maxBubbleSize

Specifies a coefficient determining the diameter of the largest bubble.

Type: Number
Default Value: 0.2
This member is exposed by the following entities:

When defining a bubble series, you are required to specify a size field. The largest size value will be represented on the chart by the largest bubble. Its visual diameter will be calculated by the following formula.

d = maxBubbleSize * min(height, width)

Normally, the height and width from this formula equal the size of the widget container. However, when several panes are used in the widget, the height and width equal the pane size.

minBubbleSize

Specifies the diameter of the smallest bubble measured in pixels.

Type: Number
Default Value: 12
This member is exposed by the following entities:

When defining a bubble series, you are required to specify a size field. The smallest size value will be represented on the chart by the smallest bubble. To set its visual diameter, specify the minBubbleSize option.

negativesAsZeroes

Forces the widget to treat negative values as zeroes. Applies to stacked-like series only.

Oftentimes, series data contains negative values. Visualizing such data using stacked-like series may lead to unexpected results. To prevent situations of that kind, assign true to the negativesAsZeroes option, and the widget will count all negative values as zeroes.

onArgumentAxisClick

A handler for the argumentAxisClick event.

Type: function(e) |String
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
element: Object
The widget's container.
jQueryEvent: jQuery.Event
The jQuery event.
argument: Date|Number|String
The argument axis.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as the parameter. You can find the value of the clicked label among fields of this object.

Alternatively, you can navigate to a specific URL when the argumentAxisClick event fires. For this purpose, assign this URL to the onArgumentAxisClick option.

Show Example:
jQuery

In this example, the argument axis' labels respond to click.

<div id="chartContainer" style="height:350px;max-width:800px;margin: 0px auto"></div>
<div id="clickResponseContainer" style="height:20px;width:300px;margin:5px auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        onArgumentAxisClick: function (info) {
            $("#clickResponseContainer").html("The " + info.argument + " label has been clicked");
        }
    });
});

onDisposing

A handler for the disposing event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
Default Value: null

Assign a function to perform a custom action when the widget is being removed.

NOTE: The function assigned to this option is executed only if the widget is removed using the remove(), empty(), or html() jQuery methods.

onDone

A handler for the done event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
Cannot be used in themes.

onDrawn

A handler for the drawn event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
Cannot be used in themes.

If you need to perform specific actions when the widget has finished drawing itself, assign a callback function to the drawn option. When implementing this function, you can access the drawn widget using the function's parameter.

onIncidentOccurred

A handler for the incidentOccurred event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
target: Object
Information about the occurred incident.

When an error or warning appears, the widget notifies you by passing a message to the browser console. This message contains the ID of the incident, a brief description, and a link to the Errors and Warnings section where further information about this incident can be found. However, you can handle errors and warnings in the way that you require. To do this, implement a callback function performing the required actions and assign it to the onIncidentOccurred option. Within this function, you can use information about the incident that occurred. This information can be accessed from the target field of the object passed to the callback function as a parameter. This information includes the following.

  • id
    Contains the ID of the incident. The full list of IDs can be found in the Errors and Warnings section.
  • type
    Contains the type of the incident. This field equals 'error' for errors or 'warning' for warnings.
  • args
    Contains the argument of the incident's message. The content of this field varies greatly, depending on the incident. For example, it may contain the name of the data source field that was not specified correctly, or the name of the option that was not set properly.
  • text
    Contains the text passed to the browser console. This text includes the content of the args field, if there are any.
  • widget
    Contains the name of the widget that produced the error or warning.
  • version
    Contains the currently used version of the ChartJS library.
Show Example:
jQuery

In this example, the type of the argument axis values is 'numeric'. Change it to 'string' using the drop-down list below the chart to induce an error. Information about the error will be displayed.

<div id="chartContainer" style="height: 500px; max-width: 700px; margin: 0 auto"></div>
<div id="selectionSpan" style="height: 25px; max-width: 500px; margin: 5px auto; text-align: center"></div>
<div id="selectContainer" style="height: 40px; width: 300px; margin: 5px auto; text-align: center">
    argumentType:
    <select id="dropdownListSelector">
        <option value="numeric">numeric</option>
        <option value="string">string</option>
    </select>
</div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        argumentAxis: {
            argumentType: 'numeric',
            type: 'continuous'
        },
        onIncidentOccurred: function (info) {
            var incidentInfo = info.target;
            $('#selectionSpan').html(incidentInfo.id + ': ' + incidentInfo.text);
        }
    });

    $('#dropdownListSelector').change(function () {
        var chart = $('#chartContainer').dxChart('instance');
        $('#selectionSpan').html('');
        chart.option({
            argumentAxis: { argumentType: this.value }
        });
    });
});

onInitialized

A handler for the initialized event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
element: jQuery
An HTML element of the widget.
Default Value: null

Assign a function to perform a custom action when the widget is initialized.

onLegendClick

A handler for the legendClick event.

Type: function(e) |String
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
element: Object
The widget's container.
jQueryEvent: jQuery.Event
The jQuery event.
target: Series
The series to which the clicked legend item belongs.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the series to which the clicked legend item belongs. To learn about series members you can use, refer to the description of the Series object.

Alternatively, you can navigate to a specific URL when the legendClick event fires. For this purpose, assign this URL to the onLegendClick option.

To learn more about handling click operations, and to see an example, refer to the Click Handling topic.

View Demo

Show Example:
jQuery

Click one of the legend items, and the information on the maximum value in the series corresponding to this legend item will appear below.

<div id="chartContainer" style="height:500px; max-width:800px; margin: 0 auto"></div>
<div id="selectionSpan" style="height:20px;max-width:500px;margin:5px auto;text-align:center"></div>
var dataSource = [
    { country: 'China', y014: 320866959, y1564: 853191410, y65: 87774113 },
    { country: 'India', y014: 340419115, y1564: 626520945, y65: 47063757 },
    { country: 'United States', y014: 58554755, y1564: 182172625, y65: 34835293},
    { country: 'Indonesia', y014: 68715705, y1564: 146014815, y65: 10053690},
    { country: 'Brazil', y014: 50278034, y1564: 113391494, y65: 9190842},
    { country: 'Russia', y014: 26465156, y1564: 101123777, y65: 18412243}
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'country'
        },
        series: [
            { valueField: 'y014', name: '0-14 years' },
            { valueField: 'y1564', name: '15-64 years' },
            { valueField: 'y65', name: '65 years and older' }
        ],
        title: 'Population: Age Structure (2000)',
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        onLegendClick: function (info) {
            var valueArray = [];
            var series = info.target;
            $.each(series.getAllPoints(), function (_, currentPoint) {
                valueArray.push(currentPoint.value);
            });
            valueArray.max = function () {
                return Math.max.apply(Math, valueArray);
            };
            $('#selectionSpan').html('Maximum value in the &#34;' + series.name + '&#34; series: ' + valueArray.max());
        }
    });
});

onOptionChanged

A handler for the optionChanged event.

Type: function
Function parameters:
e: Object
Provides function parameters.
Object structure:
component: Object
Provides access to the widget instance.
name: String
Specifies the name of the option whose value is changed.
fullName: String
Specifies a full name of the option whose value is changed. The full name is formed by concatenating the names of the options that are presented in the hierarchy of the given option. The names are delimited by commas.
value: any
Specifies a new value for the option.
element: jQuery
An HTML element of the widget.
model: Object
Provides access to the data that is available for binding against the element. Available only in the Knockout and AngularJS approaches.
Default Value: null

Assign a function to perform a custom action after an option of the component is changed.

Show Example:
jQuery

In this example, use the checkbox below to change the legend's visibility. When you change it, the optionChanged event handler puts information on this event to the container at the bottom.

<div id="chartContainer" style="height: 500px; width: 700px; margin: 0 auto"></div>
<div id="checkBox"></div>
<div id="info" style="height: 40px; width: 400px; margin: 5px auto;"></div>
var dataSource = [
    { city: 'Istanbul', y1990: 7620000, y2000: 10923000, y2012: 13854740 },
    { city: 'Moscow', y1990: 8967332, y2000: 10382754, y2012: 11689048 },
    { city: 'London', y1990: 6887280, y2000: 8173941, y2012: 8308369 },
    { city: 'Saint Petersburg', y1990: 5035200, y2000: 4694000, y2012: 5028000 },
    { city: 'Ankara', y1990: 2583963, y2000: 3703362, y2012: 4965542 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'city',
            type: 'bar'
        },
        series: [
            { valueField: 'y1990', name: '1990' },
            { valueField: 'y2000', name: '2000' },
            { valueField: 'y2012', name: '2012' }
        ],
        title: 'Largest Cities in Europe',
        valueAxis: {
            label: { format: 'largeNumber' }
        },
        onOptionChanged: function (info) {
            $('#info').html('Option change detected. "' + info.name + '": ' + JSON.stringify(info.value))
        }
    });

    $("#checkBox").dxCheckBox({
        text: 'Legend is visible',
        value: true,
        onValueChanged: function (info) {
            var chart = $('#chartContainer').dxChart('instance');
            chart.option({
                legend: { visible: info.value }
            });
        }
    });
});
body {
    text-align: center;
}
#checkBox {
    margin-top: 25px;
}

onPointClick

A handler for the pointClick event.

Type: function(e) |String
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
jQueryEvent: jQuery.Event
The jQuery event.
target: Point
The clicked series point.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the clicked series point. To learn about point's members that you can use, refer to the description of the Point object.

NOTE: A click on a series point causes the seriesClick event to fire after the pointClick event. To prevent this behavior, assign true to the jQueryEvent.cancel field of the object passed to the pointClick event handler as the argument.

Alternatively, you can navigate to a specific URL when the pointClick event fires. For this purpose, assign this URL to the onPointClick option.

To learn more about how to handle click operations, and to see an example, refer to the Click Handling topic.

View Demo

Show Example:
jQuery

Click one of the points on the chart, and a message with the data on this point will appear below.

<div id="chartContainer" style="height: 500px; max-width: 700px; margin: 0 auto"></div>
<div id="selectionSpan" style="height: 40px; max-width: 700px; margin: 5px auto; text-align: center"></div>
var dataSource = [
    { country: 'China', y014: 320866959, y1564: 853191410, y65: 87774113 },
    { country: 'India', y014: 340419115, y1564: 626520945, y65: 47063757 },
    { country: 'United States', y014: 58554755, y1564: 182172625, y65: 34835293 },
    { country: 'Indonesia', y014: 68715705, y1564: 146014815, y65: 10053690 },
    { country: 'Brazil', y014: 50278034, y1564: 113391494, y65: 9190842 },
    { country: 'Russia', y014: 26465156, y1564: 101123777, y65: 18412243 }
];

$(function () {
    $('#chartContainer').dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'country'
        },
        series: [
            { valueField: 'y014', name: '0-14 years old' },
            { valueField: 'y1564', name: '15-64 years old' },
            { valueField: 'y65', name: '65 years old and older' }
        ],
        title: 'Population: Age Structure (2000)',
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        onPointClick: function (info) {
            var clickedPoint = info.target;
            $('#selectionSpan').html('Population of the ' + clickedPoint.series.name +
                ' people in ' + clickedPoint.originalArgument + ' in 2000 was ' + clickedPoint.originalValue);
        }
    });
});

onPointHoverChanged

A handler for the pointHoverChanged event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
target: Point
The series point whose hover state has been changed.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the series point whose hover state has been changed. To identify whether this point was hovered over or hovered out, call its isHovered() method. To discover point fields and methods, refer to the Point class description.

To learn more about how to handle hover operations, refer to the Hover Handling topic.

Show Example:
jQuery

In this example, when a point on the chart is hovered over, the pie chart displays the information about the Olympic medals won by the US team in the year corresponding to the hovered point. When none of the chart points are hovered, the pie chart displays the information about medals won by this team overall.

<div id="chartContainer" style="height:300px;width:700px;margin: 0 auto"></div>
<div id="pieChartContainer" style="height:300px;width:300px;margin: 0 auto"></div>
var dataSource = [
    { year: '1896', gold: 11, silver: 7, bronze: 2 },
    { year: '1900', gold: 19, silver: 14, bronze: 14 },
    { year: '1904', gold: 78, silver: 82, bronze: 79 },
    { year: '1908', gold: 23, silver: 12, bronze: 12 },
    { year: '1912', gold: 25, silver: 19, bronze: 19 },
    { year: '1920', gold: 41, silver: 27, bronze: 27 },
    { year: '1924', gold: 46, silver: 29, bronze: 28 },
    { year: '1928', gold: 24, silver: 20, bronze: 18 },
    { year: '1932', gold: 47, silver: 36, bronze: 32 },
    { year: '1936', gold: 25, silver: 20, bronze: 15 },
    { year: '1948', gold: 41, silver: 31, bronze: 21 },
    { year: '1952', gold: 44, silver: 25, bronze: 18 },
    { year: '1956', gold: 34, silver: 28, bronze: 19 },
    { year: '1960', gold: 37, silver: 25, bronze: 19 },
    { year: '1964', gold: 37, silver: 28, bronze: 31 },
    { year: '1968', gold: 46, silver: 33, bronze: 35 },
    { year: '1972', gold: 36, silver: 33, bronze: 33 },
    { year: '1976', gold: 37, silver: 38, bronze: 29 },
    { year: '1980', gold: 6, silver: 4, bronze: 2 },
    { year: '1984', gold: 87, silver: 65, bronze: 30 },
    { year: '1988', gold: 38, silver: 32, bronze: 30 },
    { year: '1992', gold: 42, silver: 38, bronze: 39 },
    { year: '1994', gold: 6, silver: 5, bronze: 2 },
    { year: '1996', gold: 44, silver: 32, bronze: 25 },
    { year: '1998', gold: 6, silver: 3, bronze: 4 },
    { year: '2000', gold: 37, silver: 24, bronze: 32 },
    { year: '2002', gold: 10, silver: 13, bronze: 11 },
    { year: '2004', gold: 36, silver: 39, bronze: 26 },
    { year: '2006', gold: 9, silver: 9, bronze: 7 },
    { year: '2008', gold: 36, silver: 38, bronze: 36 },
    { year: '2010', gold: 9, silver: 15, bronze: 13 },
    { year: '2012', gold: 46, silver: 29, bronze: 29 }
];

var dataSourceTotal = [
    { type: 'Gold', amount: 1063 },
    { type: 'Silver', amount: 853 },
    { type: 'Bronze', amount: 737 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'stackedline'
        },
        series: [
            { valueField: 'gold', name: 'Gold', color: 'gold' },
            { valueField: 'silver', name: 'Silver', color: 'silver' },
            { valueField: 'bronze', name: 'Bronze', color: '#CD7F32' }
        ],
        title: 'US Olympic Medals Overall',
        argumentAxis: {
            valueMarginsEnabled: false,
            label: { overlappingBehavior: 'stagger' }
        },
        legend: { visible: false },
        onPointHoverChanged: function (info) {
            var hoveredPoint = info.target;
            var pieChart = $('#pieChartContainer').dxPieChart('instance');
            var chart = $('#chartContainer').dxChart('instance');
            if (hoveredPoint.isHovered()) {
                var newPieDataSource = [];
                $.each(chart.getAllSeries(), function (_, currentSeries) {
                    point = currentSeries.getPointsByArg(hoveredPoint.originalArgument)[0];
                    newPieDataSource.push({ type: point.series.name, amount: point.originalValue });
                });
                pieChart.option({
                    dataSource: newPieDataSource
                });
            } else {
                pieChart.option({
                    dataSource: dataSourceTotal
                });
            }
        }
    });
});

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSourceTotal,
        series: {
            argumentField: 'type',
            valueField: 'amount',
            label: {
                visible: true,
                connector: { visible: true }
            }
        },
        palette: ['gold', 'silver', '#CD7F32'],
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        }
    });
});

onPointSelectionChanged

A handler for the pointSelectionChanged event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
target: Point
The series point whose selection state has been changed.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the series point whose selection state has been changed. To identify whether this point was selected or deselected, call its isSelected() method. To discover point fields and methods that you can use, refer to the Point class description.

To learn more about how to handle selection, refer to the Selection Handling topic.

Show Example:
jQuery

In this example, click a point on the chart to select/unselect all points with the same argument. When the points are selected, the pie chart displays the information about the Olympic medals won by the US team in the year corresponding to the selected points. When none of the chart points are selected, the pie chart displays the information about medals won by this team overall.

<div id="chartContainer" style="height:300px;width:700px;margin: 0 auto"></div>
<div id="pieChartContainer" style="height:300px;width:300px;margin: 0 auto"></div>
var dataSource = [
    { year: '1896', gold: 11, silver: 7, bronze: 2 },
    { year: '1900', gold: 19, silver: 14, bronze: 14 },
    { year: '1904', gold: 78, silver: 82, bronze: 79 },
    { year: '1908', gold: 23, silver: 12, bronze: 12 },
    { year: '1912', gold: 25, silver: 19, bronze: 19 },
    { year: '1920', gold: 41, silver: 27, bronze: 27 },
    { year: '1924', gold: 46, silver: 29, bronze: 28 },
    { year: '1928', gold: 24, silver: 20, bronze: 18 },
    { year: '1932', gold: 47, silver: 36, bronze: 32 },
    { year: '1936', gold: 25, silver: 20, bronze: 15 },
    { year: '1948', gold: 41, silver: 31, bronze: 21 },
    { year: '1952', gold: 44, silver: 25, bronze: 18 },
    { year: '1956', gold: 34, silver: 28, bronze: 19 },
    { year: '1960', gold: 37, silver: 25, bronze: 19 },
    { year: '1964', gold: 37, silver: 28, bronze: 31 },
    { year: '1968', gold: 46, silver: 33, bronze: 35 },
    { year: '1972', gold: 36, silver: 33, bronze: 33 },
    { year: '1976', gold: 37, silver: 38, bronze: 29 },
    { year: '1980', gold: 6, silver: 4, bronze: 2 },
    { year: '1984', gold: 87, silver: 65, bronze: 30 },
    { year: '1988', gold: 38, silver: 32, bronze: 30 },
    { year: '1992', gold: 42, silver: 38, bronze: 39 },
    { year: '1994', gold: 6, silver: 5, bronze: 2 },
    { year: '1996', gold: 44, silver: 32, bronze: 25 },
    { year: '1998', gold: 6, silver: 3, bronze: 4 },
    { year: '2000', gold: 37, silver: 24, bronze: 32 },
    { year: '2002', gold: 10, silver: 13, bronze: 11 },
    { year: '2004', gold: 36, silver: 39, bronze: 26 },
    { year: '2006', gold: 9, silver: 9, bronze: 7 },
    { year: '2008', gold: 36, silver: 38, bronze: 36 },
    { year: '2010', gold: 9, silver: 15, bronze: 13 },
    { year: '2012', gold: 46, silver: 29, bronze: 29 }
];

var dataSourceTotal = [
    { type: 'Gold', amount: 1063 },
    { type: 'Silver', amount: 853 },
    { type: 'Bronze', amount: 737 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'stackedline',
            point: { selectionMode: 'allArgumentPoints' }
        },
        series: [
            { valueField: 'gold', name: 'Gold', color: 'gold' },
            { valueField: 'silver', name: 'Silver', color: 'silver' },
            { valueField: 'bronze', name: 'Bronze', color: '#CD7F32' }
        ],
        title: 'US Olympic Medals Overall',
        argumentAxis: {
            valueMarginsEnabled: false,
            label: { overlappingBehavior: 'stagger' }
        },
        legend: { visible: false },
        onPointClick: function (info) {
            var clickedPoint = info.target;
            clickedPoint.isSelected() ? clickedPoint.clearSelection() : clickedPoint.select();
        },
        onPointSelectionChanged: function (info) {
            var selectedPoint = info.target;
            var pieChart = $('#pieChartContainer').dxPieChart('instance');
            var chart = $('#chartContainer').dxChart('instance');
            if (selectedPoint.isSelected()) {
                var newPieDataSource = [];
                $.each(chart.getAllSeries(), function (_, currentSeries) {
                    point = currentSeries.getPointsByArg(selectedPoint.originalArgument)[0];
                    newPieDataSource.push({ type: point.series.name, amount: point.originalValue });
                });
                pieChart.option({
                    dataSource: newPieDataSource
                });
            } else {
                pieChart.option({
                    dataSource: dataSourceTotal
                });
            }
        }
    });
});

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSourceTotal,
        series: {
            argumentField: 'type',
            valueField: 'amount',
            label: {
                visible: true,
                connector: { visible: true }
            }
        },
        palette: ['gold', 'silver', '#CD7F32'],
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        }
    });
});

onSeriesClick

A handler for the seriesClick event.

Type: function(e) |String
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
element: Object
The widget's container.
jQueryEvent: jQuery.Event
The jQuery event.
target: Series
The clicked series.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the clicked series. To learn about series members that you can use, refer to the description of the Series object.

NOTE: The seriesClick also fires when a user clicks a series point or a legend item, but only if it is not canceled in the pointClick and legendClick event handlers.

Alternatively, you can navigate to a specific URL when the seriesClick event fires. For this purpose, assign this URL to the onSeriesClick option.

To learn more about handling click operations, and to see an example, refer to the Click Handling topic.

View Demo

Show Example:
jQuery

Click one of the series on the chart, and the information on the maximum value in this series will appear below.

<div id="chartContainer" style="height:500px;max-width:700px;margin: 0px auto"></div>
<div id="selectionSpan" style="height:40px;width:400px;margin:5px auto;text-align:center"></div>
var dataSource = [
    { country: 'China', y014: 320866959, y1564: 853191410, y65: 87774113 },
    { country: 'India', y014: 340419115, y1564: 626520945, y65: 47063757 },
    { country: 'United States', y014: 58554755, y1564: 182172625, y65: 34835293 },
    { country: 'Indonesia', y014: 68715705, y1564: 146014815, y65: 10053690 },
    { country: 'Brazil', y014: 50278034, y1564: 113391494, y65: 9190842 },
    { country: 'Russia', y014: 26465156, y1564: 101123777, y65: 18412243 }
];

$(function () {
    $('#chartContainer').dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'country'
        },
        series: [
            { valueField: 'y014', name: '0-14 years' },
            { valueField: 'y1564', name: '15-64 years' },
            { valueField: 'y65', name: '65 years and older' }
        ],
        title: 'Population: Age Structure (2000)',
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        onSeriesClick: function (info) {
            var valueArray = [];
            var clickedSeries = info.target;
            $.each(clickedSeries.getAllPoints(), function (_, currentPoint) {
                valueArray.push(currentPoint.value);
            });
            valueArray.max = function () {
                return Math.max.apply(Math, valueArray);
            };
            $('#selectionSpan').html('Maximum value in the &#34;' + clickedSeries.name +
                '&#34; series: ' + valueArray.max());
        }
    });
});

onSeriesHoverChanged

A handler for the seriesHoverChanged event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
element: Object
The widget's container.
target: Series
The series whose hover state has been changed.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the series whose hover state has been changed. To identify whether this series was hovered over or hovered out, call its isHovered() method. To discover series fields and methods, refer to the Series class description.

To learn more about how to handle hover operations, refer to the Hover Handling topic.

Show Example:
jQuery

In this example, when a series on the chart is hovered over, the pie chart displays the information about the population in the year corresponding to the hovered series. When none of the chart series is hovered, the pie chart displays the information about the population by year overall.

<div id="chartContainer" style="height:350px;width:700px;margin: 0 auto"></div>
<div id="pieChartContainer" style="height:350px;width:500px;margin: 0 auto"></div>
var dataSource = [
    { city: 'Istanbul', y1990: 7620000, y2000: 10923000, y2012: 13854740 },
    { city: 'Moscow', y1990: 8967332, y2000: 10382754, y2012: 11689048 },
    { city: 'London', y1990: 6887280, y2000: 8173941, y2012: 8308369 },
    { city: 'Saint Petersburg', y1990: 5035200, y2000: 4694000, y2012: 5028000 },
    { city: 'Ankara', y1990: 2583963, y2000: 3703362, y2012: 4965542 }
];

var dataSourceTotal = [
    { city: '1990', population: 31093775 },
    { city: '2000', population: 37877057 },
    { city: '2012', population: 43845699 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'city',
            type: 'stackedline',
            label: {
                visible: true,
                connector: { visible: true },
                format: 'largeNumber',
                precision: 2
            }
        },
        series: [
			{ valueField: 'y1990', name: '1990' },
			{ valueField: 'y2000', name: '2000' },
			{ valueField: 'y2012', name: '2012' }
        ],
        palette: 'Soft Pastel',
        title: 'Largest Cities in Europe',
        valueAxis: {
            label: { format: 'largeNumber' },
            title: 'Population within borders'
        },
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        onSeriesHoverChanged: function (info) {
            var hoveredSeries = info.target;
            var pieChart = $('#pieChartContainer').dxPieChart('instance');
            var chart = $('#chartContainer').dxChart('instance');
            if (hoveredSeries.isHovered()) {
                var newPieDataSource = [];
                $.each(hoveredSeries.getAllPoints(), function (_, point) {
                    newPieDataSource.push({ city: point.originalArgument, population: point.originalValue });
                });
                pieChart.option({
                    dataSource: newPieDataSource
                });
            } else {
                pieChart.option({
                    dataSource: dataSourceTotal
                });
            }
        }
    });
});

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSourceTotal,
        series: {
            argumentField: 'city',
            valueField: 'population',
            label: {
                visible: true,
                connector: { visible: true },
                format: 'largeNumber',
                precision: 2
            }
        },
        palette: 'Soft Pastel'
    });
});

onSeriesSelectionChanged

A handler for the seriesSelectionChanged event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
element: Object
The widget's container.
target: Series
The series whose selection state has been changed.
Cannot be used in themes.

When implementing a handling function, use the object passed to it as its parameter. Among the fields of this object, you can find the series whose selection state has been changed. To identify whether this series was selected or deselected, call its isSelected() method. To discover series fields and methods, refer to the Series class description.

To learn more about how to handle selection, refer to the Selection Handling topic.

Show Example:
jQuery

In this example, click a series on the chart to select/deselect it. When the chart series is selected, the pie chart displays the information about the population in the year corresponding to the selected series. When none of the chart series is selected, the pie chart displays the information about the population by year overall.

<div id="chartContainer" style="height:350px;width:700px;margin: 0 auto"></div>
<div id="pieChartContainer" style="height:350px;width:500px;margin: 0 auto"></div>
var dataSource = [
    { city: 'Istanbul', y1990: 7620000, y2000: 10923000, y2012: 13854740 },
    { city: 'Moscow', y1990: 8967332, y2000: 10382754, y2012: 11689048 },
    { city: 'London', y1990: 6887280, y2000: 8173941, y2012: 8308369 },
    { city: 'Saint Petersburg', y1990: 5035200, y2000: 4694000, y2012: 5028000 },
    { city: 'Ankara', y1990: 2583963, y2000: 3703362, y2012: 4965542 }
];

var dataSourceTotal = [
    { city: '1990', population: 31093775 },
    { city: '2000', population: 37877057 },
    { city: '2012', population: 43845699 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'city',
            type: 'bar',
            label: {
                visible: true,
                connector: { visible: true },
                format: 'largeNumber',
                precision: 2
            },
            selectionMode: 'allSeriesPoints'
        },
        series: [
            { valueField: 'y1990', name: '1990' },
            { valueField: 'y2000', name: '2000' },
            { valueField: 'y2012', name: '2012' }
        ],
        palette: 'Soft Pastel',
        title: 'Largest Cities in Europe',
        valueAxis: {
            label: { format: 'largeNumber' },
            title: 'Population within borders'
        },
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        onSeriesClick: function (info) {
            var clickedSeries = info.target;
            clickedSeries.isSelected() ? clickedSeries.clearSelection() : clickedSeries.select();
        },
        onSeriesSelectionChanged: function (info) {
            var selectedSeries = info.target;
            var pieChart = $('#pieChartContainer').dxPieChart('instance');
            var chart = $('#chartContainer').dxChart('instance');
            if (selectedSeries.isSelected()) {
                var newPieDataSource = [];
                $.each(selectedSeries.getAllPoints(), function (_, point) {
                    newPieDataSource.push({ city: point.originalArgument, population: point.originalValue });
                });
                pieChart.option({
                    dataSource: newPieDataSource
                });
            } else {
                pieChart.option({
                    dataSource: dataSourceTotal
                });
            }
        }
    });
});

$(function () {
    $("#pieChartContainer").dxPieChart({
        dataSource: dataSourceTotal,
        series: {
            argumentField: 'city',
            valueField: 'population',
            label: {
                visible: true,
                connector: { visible: true },
                format: 'largeNumber',
                precision: 2
            }
        },
        palette: 'Soft Pastel'
    });
});

onTooltipHidden

A handler for the tooltipHidden event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
target: Point
The series point whose tooltip becomes hidden.
Cannot be used in themes.

The point's tooltip becomes invisible when a user hovers the mouse cursor over another series point. In addition, you can hide a tooltip in code, using the hideTooltip() method of the chart or point.

When a tooltip is made hidden, you can perform specific actions by handling the tooltipHidden event. To do this, implement a handling function and assign it to the onTooltipHidden option. When implementing this function, use the object passed to it as its parameter. Among the fields of this object, you can find the series point whose tooltip becomes hidden.

Show Example:
jQuery

In this example, when a tooltip is made hidden, the function assigned to the onTooltipHidden option is called. This function displays a message with the corresponding content.

<div id="chartContainer" style="height: 500px; max-width: 700px; margin: 0 auto"></div>
<div id="selectionSpan" style="height: 40px; width: 350px; margin: 5px auto; text-align: center"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        tooltip: {
            enabled: true
        },
        onTooltipHidden: function (info) {
            var point = info.target;
            $('#selectionSpan').html("'onTooltipHidden' was called for the (" + point.argument + "; " + point.value + ") point");
        }
    });
});

onTooltipShown

A handler for the tooltipShown event.

Type: function(e)
Function parameters:
e: Object
Information about the event.
Object structure:
component: Object
The widget instance.
element: Object
The widget's container.
target: Point
The series point whose tooltip appears.
Cannot be used in themes.

The point's tooltip appears when a user hovers the mouse cursor over the point. In addition, you can show a tooltip in code, using the showTooltip() method of the chart or point.

When a tooltip appears, you can perform specific actions by handling the tooltipShown event. To do this, implement a handling function and assign it to the onTooltipShown option. When implementing this function, use the object passed to it as its parameter. Among the fields of this object, you can find the series point whose tooltip appears.

Show Example:
jQuery

In this example, when a tooltip is shown, the function assigned to the onTooltipShown option is called. This function displays a message with the corresponding content.

<div id="chartContainer" style="height: 500px; max-width: 700px; margin: 0 auto"></div>
<div id="selectionSpan" style="height: 40px; width: 350px; margin: 5px auto; text-align: center"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        tooltip: {
            enabled: true
        },
        onTooltipShown: function (info) {
            var point = info.target;
            $('#selectionSpan').html("'onTooltipShown' was called for the (" + point.argument + "; " + point.value + ") point");
        }
    });
});

palette

Sets the name of the palette to be used in the chart. Alternatively, an array of colors can be set as a custom palette to be used within this chart.

Type: Array|String
Default Value: 'Default'
Accepted Values: 'Default' | 'Soft Pastel' | 'Harmony Light' | 'Pastel' | 'Bright' | 'Soft' | 'Ocean' | 'Vintage' | 'Violet'

Use this property to set a predefined or custom palette. The colors listed in the specified palette will be used to draw chart series, their points, labels and tooltips. If the number of a series is greater than the number of colors in the palette, palette colors are repeated, but slightly modified.

You can override the color of individual series and their points, labels and tooltips by setting the color property of the corresponding object. In addition, you can define a custom palette to use in your charts. To learn how to do this, refer to the Palettes topic.

Show Example:
jQuery

This example shows how to create a custom palette and apply it to a chart.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

var myPalette = ['#7CBAB4', '#92C7E2', '#75B5D6', '#B78C9B', '#F2CA84', '#A7CA74'];
DevExpress.viz.registerPalette('mySuperPalette', myPalette);

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        palette: 'mySuperPalette'
    });
});

panes

Defines the dxChart widget's pane(s).

Type: Object|Array
Cannot be used in themes.

A Pane is a visual area within a chart that includes all the elements required to display data. If you need to plot several series, you can distribute them between several panes. In this instance, the series are easily compared to each other and provide the entire picture of the presented data. To define panes, introduce the panes array of objects. Each object represents a single pane. To identify panes, set their name property.

If you need to set similar values to properties of several panes, use the commonPaneSettings configuration object. It exposes the properties that can be specified for all panes at once. Note that the values specified for a pane individually (in the panes array) override the values that are specified for all panes (in the commonPaneSettings object).

If you plot all series on one pane, use the panes configuration object to make the pane's border visible, set up border options or set the pane's background color, if required.

Show Example:
jQuery

In this example, two panes are used to represent data. Each pane is defined within the panes array.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { month: 'January', avgT: 9.8, minT: 4.1, maxT: 15.5, prec: 109 },
    { month: 'February', avgT: 11.8, minT: 5.8, maxT: 17.8, prec: 104 },
    { month: 'March', avgT: 13.4, minT: 7.2, maxT: 19.6, prec: 92 },
    { month: 'April', avgT: 15.4, minT: 8.1, maxT: 22.8, prec: 30 },
    { month: 'May', avgT: 18, minT: 10.3, maxT: 25.7, prec: 10 },
    { month: 'June', avgT: 20.6, minT: 12.2, maxT: 29, prec: 2 },
    { month: 'July', avgT: 22.2, minT: 13.2, maxT: 31.3, prec: 2 },
    { month: 'August', avgT: 22.2, minT: 13.2, maxT: 31.1, prec: 1 },
    { month: 'September', avgT: 21.2, minT: 12.4, maxT: 29.9, prec: 8 },
    { month: 'October', avgT: 17.9, minT: 9.7, maxT: 26.1, prec: 24 },
    { month: 'November', avgT: 12.9, minT: 6.2, maxT: 19.6, prec: 64 },
    { month: 'December', avgT: 9.6, minT: 3.4, maxT: 15.7, prec: 76 },
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'month'
        },
        panes: [
            { name: 'topPane' },
            { name: 'bottomPane' }
        ],
        series: [{
            pane: 'topPane',
            type: 'rangeArea',
            rangeValue1Field: 'minT',
            rangeValue2Field: 'maxT',
            name: 'Monthly Temperature Ranges, °C'
        }, {
            pane: 'topPane',
            valueField: 'avgT',
            name: 'Average Temperature, °C'
        }, {
            type: 'bar',
            valueField: 'prec',
            name: 'prec, mm'
        }
        ],
        valueAxis: [
          { pane: 'bottomPane', grid: { visible: true } },
          { pane: 'topPane', grid: { visible: true } }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

pathModified

Notifies a widget that it is embedded into an HTML page that uses a path modifier.

Type: Boolean
Default Value: false
Cannot be used in themes.

If you place a widget on a page that uses a path modifier, notify the widget about it by setting the pathModified option to true. As an example of such modifiers, the base HTML tag can be considered. Also, we recommend you enable this option if you place the widget inside the <iframe> tag.

pointSelectionMode

Specifies whether a single point or multiple points can be selected in the chart.

Type: String
Default Value: 'single'
Accepted Values: 'single' | 'multiple'

To set the points to highlight along with the selected point, set the series | point | selectionMode option.

To learn how to select a point, refer to the Selection Handling topic.

View Demo

Show Example:
jQuery

In this example, click a point to select/deselect this point. The pointSelectionMode option is set to multiple so that you can select multiple points. When selecting a point, the Total value of selected points number represented below is changed. Click the Clear selected points button to deselect all points at once.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
<div style="height:25px;max-width:500px;margin:0px auto;font-family:'Trebuchet MS',Arial,sans-serif;font-size:14px;text-align:center">
    <span id="selectionSpan">There are no selected points</span>
</div>
<div style="height:25px;max-width:500px;margin:0px auto;text-align:center">
    <input type="button" id="clearSelectedPointsButton" value="Clear selected points" />
</div>
var dataSource = [
    { country: 'China', y014: 320866959, y1564: 853191410, y65: 87774113 },
    { country: 'India', y014: 340419115, y1564: 626520945, y65: 47063757 },
    { country: 'United States', y014: 58554755, y1564: 182172625, y65: 34835293 },
    { country: 'Indonesia', y014: 68715705, y1564: 146014815, y65: 10053690 },
    { country: 'Brazil', y014: 50278034, y1564: 113391494, y65: 9190842 },
    { country: 'Russia', y014: 26465156, y1564: 101123777, y65: 18412243 }
];

var series = [
    { valueField: 'y014', name: '0-14 years old' },
    { valueField: 'y1564', name: '15-64 years old' },
    { valueField: 'y65', name: '65 years and older' }
];

$(function () {
    var totalPopulation = 0;
    $('#chartContainer').dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'country'
        },
        series: series,
        title: 'Population: Age Structure (2000)',
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        pointSelectionMode: 'multiple',
        onPointClick: function (info) {
            var clickedPoint = info.target;
            if (clickedPoint.isSelected()) {
                clickedPoint.clearSelection();
                totalPopulation -= clickedPoint.originalValue;
            } else {
                clickedPoint.select();
                totalPopulation += clickedPoint.originalValue;
            }
            $('#selectionSpan').html('Total value of selected points is ' + totalPopulation);
        },
        pointSelected: function (selectedPoint) {
            totalPopulation += selectedPoint.originalValue;
            $('#selectionSpan').html('Total value of selected points is ' + totalPopulation);
        }
    });

    $('#clearSelectedPointsButton').click(function () {
        var chart = $('#chartContainer').dxChart('instance');
        chart.clearSelection();
        totalPopulation = 0;
        $('#selectionSpan').html('Total value of selected points is ' + totalPopulation);
    });
});

redrawOnResize

Specifies whether to redraw the widget when the size of the parent browser window changes or a mobile device rotates.

Type: Boolean
Default Value: true
Cannot be used in themes.

When this option is set to true, the widget will be redrawn automatically in case the size of its parent window changes.

NOTE: To redraw the widget after the size of its container has changed, call the render() method of the widget instance.

resolveLabelOverlapping

Specifies how the chart must behave when series point labels overlap.

Type: String
Default Value: 'none'
Accepted Values: 'none' | 'hide' | 'stack'

Series point labels display series point values. If your chart contains several series with a large number of points in each, point labels may overlap. In this case, specify how the chart must resolve overlapping using the resolveLabelOverlapping option. To hide certain labels, set this option to 'hide'. Labels to be hidden will be determined automatically. If labels that overlap belong to series points that have the same argument, you can arrange these labels in a stack. For this purpose, set the resolveLabelOverlapping option to 'stack'.

rotated

Swaps the axes round so that the value axis becomes horizontal and the argument axes becomes vertical.

Type: Boolean
Default Value: false

Show Example:
jQuery

In this example, the chart is rotated.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { state: 'Illinois', year1998: 423.721, year2001: 476.851, year2004: 528.904 },
    { state: 'Indiana', year1998: 178.719, year2001: 195.769, year2004: 227.271 },
    { state: 'Michigan', year1998: 308.845, year2001: 335.793, year2004: 372.576 },
    { state: 'Ohio', year1998: 348.555, year2001: 374.771, year2004: 418.258 },
    { state: 'Wisconsin', year1998: 160.274, year2001: 182.373, year2004: 211.727 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'state',
            type: 'bar',
            label: {
                visible: true,
                format: "fixedPoint",
                precision: 2
            }
        },
        series: [
            { valueField: 'year2004', name: '2004' },
            { valueField: 'year2001', name: '2001' },
            { valueField: 'year1998', name: '1998' }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        },
        rotated: true
    });
});

rtlEnabled

Specifies whether or not the widget supports right-to-left representation.

Type: Boolean
Default Value: false
Cannot be used in themes.

The most common scenario is switching all the widgets to a right-to-left reading order. In this instance, set the DevExpress.rtlEnabled field to true. If you need to switch the reading order in a particular widget, use the rtlEnabled configuration option of this widget.

Show Example:
jQuery

The text In this example is written in the Arabic language with the right-to-left reading order enabled. Note that the legend marker and the minus sign of the negative numbers are at the right.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { month: 'يناير', high: -4.9, low: -11.6 },
    { month: 'فبراير', high: -3, low: -10.1 },
    { month: 'مارس', high: 1.1, low: -7.1 },
    { month: 'إبريل', high: 6.9, low: -1.6 },
    { month: 'مايو', high: 13.3, low: 4.2 },
    { month: 'يونية', high: 17.13, low: 8.7 },
    { month: 'يولية', high: 18.6, low: 11.2 },
    { month: 'أغسطس', high: 17.5, low: 10 },
    { month: 'سبتمبر', high: 12.8, low: 5.6 },
    { month: 'أكتوبر', high: 4.7, low: -1.6 },
    { month: 'نوفمبر', high: -2.3, low: -8.6 },
    { month: 'ديسمبر', high: -4, low: -10.4 },
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'month',
            type: 'rangeArea'
        },
        series: [{
            rangeValue1Field: 'low', 
            rangeValue2Field: 'high',
            name: 'درجة حرارة الهواء'
        }],
        title: 'متوسط درجة الحرارة في مرسى، ألاسكا',
        rtlEnabled: true
    });
});

scrollBar

Specifies the settings of the scroll bar.

Type: Object

The scroll bar allows a user to scroll the chart. In order to use the scroll bar, you need to enable scrolling and zooming in your chart.

By default, the scroll bar is hidden. To make it visible, set the visible field of the scrollBar object to true. Using other fields of this object you can adjust the scroll bar appearance settings, including color, width and opacity.

View Demo

scrollingMode

Enables scrolling in your chart.

Type: String
Default Value: 'none'
Accepted Values: 'none' | 'touch' | 'mouse' | 'all'

This option allows you to control the scrolling capability in your chart. By default, this capability is off. To make scrolling available on touch-enabled devices only, assign 'touch' to the scrollingMode option. In that case, a user will be able to scroll the chart using the flick gesture. If your chart is not supposed to be viewed on touch-enabled devices, but you still need scrolling to be enabled, assign 'mouse' to the scrollingMode option. In that case, a user will be able to scroll the chart by dragging. To enable scrolling for all devices, assign 'all' to the scrollingMode option.

Scrolling may also be performed using the scroll bar. To make it visible assign true to the visible option of the scrollBar object.

NOTE: In many cases, scrolling is useless without zooming, and vice versa. Hence, when enabling the scrolling capability in your chart, consider enabling the zooming capability as well.

View Demo

series

Specifies options for dxChart widget series.

Type: Object|Array
Default Value: undefined
Cannot be used in themes.

A series represents a grouping of related data points. The most important characteristic of a series is its type, which determines a particular visual representation of data. You can find more details on each series type in the corresponding topics in the Series help section.

To define a single series, assign an object defining the series to the series configuration object. In the series' object, specify the series type, data source fields, the appearance of the series points and other options.

To show several series, specify series as an array of objects defining series. If you need to set similar values to properties of several series, use the commonSeriesSettings configuration object. It exposes the properties that can be specified for all series at once and for all series of a particular type at once. Note that the values specified for a series individually (in the series array) override the values that are specified for all series (in the commonSeriesSettings object).

NOTE: This option is necessary. If you do not need to specify any of the options within the series object (e.g., when you have specified them within the commonSeriesSettings object), assign at least an empty object to the series field.

Show Example:
jQuery
<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { arg: 'January', minT: 4.1, maxT: 15.5, avgT: 9.85 },
    { arg: 'February', minT: 5.8, maxT: 17.8, avgT: 11.8 },
    { arg: 'March', minT: 7.2, maxT: 19.6, avgT: 13.4 },
    { arg: 'April', minT: 8.1, maxT: 22.8, avgT: 15.4 },
    { arg: 'May', minT: 10.3, maxT: 25.7, avgT: 18 },
    { arg: 'June', minT: 12.2, maxT: 29, avgT: 20.6 },
    { arg: 'July', minT: 13.2, maxT: 31.3, avgT: 22.1 },
    { arg: 'August', minT: 13.2, maxT: 31.1, avgT: 22.2 },
    { arg: 'September', minT: 12.4, maxT: 29.9, avgT: 21.2 },
    { arg: 'October', minT: 9.7, maxT: 26.1, avgT: 17.9 },
    { arg: 'November', minT: 6.2, maxT: 19.6, avgT: 12.9 },
    { arg: 'December', minT: 3.4, maxT: 15.7, avgT: 9.6 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'arg'
        },
        series: [{
            type: 'rangeArea',
            rangeValue1Field: 'minT',
            rangeValue2Field: 'maxT',
            name: 'Monthly Temperature Ranges, °C'
        }, {
            valueField: 'avgT',
            name: 'Average Temperature, °C'
        }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

seriesSelectionMode

Specifies whether a single series or multiple series can be selected in the chart.

Type: String
Default Value: 'single'
Accepted Values: 'single' | 'multiple'

To set the series elements to highlight when a series is selected, set the series selectionMode option.

To learn how to select a point, refer to the Selection Handling topic.

View Demo

Show Example:
jQuery

In this example, the seriesSelectionMode option is set to multiple. Click a series on the chart to select/deselect this series.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { country: 'China', y014: 320866959, y1564: 853191410, y65: 87774113 },
    { country: 'India', y014: 340419115, y1564: 626520945, y65: 47063757 },
    { country: 'United States', y014: 58554755, y1564: 182172625, y65: 34835293 },
    { country: 'Indonesia', y014: 68715705, y1564: 146014815, y65: 10053690 },
    { country: 'Brazil', y014: 50278034, y1564: 113391494, y65: 9190842 },
    { country: 'Russia', y014: 26465156, y1564: 101123777, y65: 18412243 }
];
var series = [
    { valueField: 'y014', name: '0-14 years' },
    { valueField: 'y1564', name: '15-64 years' },
    { valueField: 'y65', name: '65 years and older' }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'country'
        },
        series: series,
        title: 'Population: Age Structure (2000)',
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        seriesSelectionMode: 'multiple',
        onSeriesClick: function (info) {
            var clickedSeries = info.target;
            clickedSeries.isSelected() ? clickedSeries.clearSelection() : clickedSeries.select();
        }
    });
});

seriesTemplate

Defines options for the series template.

Type: Object
Default Value: undefined
Cannot be used in themes.

In most cases, you can organize the array that is assigned to the chart's dataSource option in the following way.

[
    {arg: arg1Value, series1Value: val11, series2Value: val12, ...}
    {arg: arg2Value, series1Value: val21, series2Value: val22, ...}
    ...
    {arg: argNValue, series1Value: valN1, series2Value: valN2, ...}
]

Each object that is included in the array represents an argument value and the values of all series for this argument.

However, there are some scenarios in which you do not know exactly how many series will be added. In these cases, you will not be able to define the data source in the manner detailed above. Instead, define it in the following way.

[
    {seriesName: series1, arg: arg11Value, val: value11 }
    {seriesName: series1, arg: arg12Value, val: value12 }
    ...
    {seriesName: seriesM, arg: argM1Value, val: valueM1 }
    {seriesName: seriesM, arg: argM2Value, val: valueM2 }
    ...
]

If you define a data source in this manner, set the argument and value fields using the argumentField and valueField properties of the commonSeriesSettings configuration object (for all series at once). Then, define a template for the series using the seriesTemplate configuration object. Within this object, set the data source field that specifies the series name to the nameField option.

If you need to specify individual values for options of a particular series, assign a callback function to the customizeSeries option of the seriesTemplate object.

View Demo

size

Specifies the size of the widget in pixels.

Type: Object

The widget occupies the entire area of the parent container (division). If the container size (width or height) is set to zero, the widget is not displayed.

If you need to set a particular size for the widget, different from the container's size, use the size configuration object. Assign a height and width in pixels to height and width properties.

Show Example:
jQuery

In this example, the size of the chart is set smaller than the size of the chart container using the size option.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        size: {
            height: 300,
            width: 500
        }
    });
});

synchronizeMultiAxes

Indicates whether or not to synchronize value axes when they are displayed on a single pane.

Type: Boolean
Default Value: true

When synchronized, the ticks (or grid lines) of all the value axes in a pane are located on the same line.

Show Example:
jQuery

In this example, a multi-axes chart is displayed. Toggle the check box below to choose whether or not to synchronize the labels of the value axes.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
<div id="checkboxContainer" style="height:40px;max-width:250px;margin:5px auto;font-family:'Trebuchet MS',Arial,sans-serif;font-size:14px">
    <input type="checkbox" id="synchronizeMultiAxesCheckbox" checked> synchronizeMultiAxes
</div>
var dataSource = [
    { time: 'January', food: 3970, capital: 15366, auto: 7818, goods: 9064, total: 36218 },
    { time: 'March', food: 3875, capital: 15297, auto: 7518, goods: 9147, total: 35837 },
    { time: 'June', food: 4181, capital: 15957, auto: 7603, goods: 9311, total: 37052 },
    { time: 'August', food: 3826, capital: 15706, auto: 8046, goods: 9342, total: 36920 },
    { time: 'October', food: 3899, capital: 14940, auto: 8233, goods: 9244, total: 36316 },
    { time: 'December', food: 3941, capital: 15664, auto: 8642, goods: 10134, total: 38381 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            fullstackedarea: {
                axis: 'percentAxis'
            },
            type: 'fullstackedArea',
            argumentField: 'time'
        },
        animation: false,
        series: [
            { valueField: 'food', name: 'Food' },
            { valueField: 'capital', name: 'Capital Goods' },
            { valueField: 'auto', name: 'Automotive Vehicles' },
            { valueField: 'goods', name: 'Customer Goods' },
            { valueField: 'total', name: 'Goods in total', type: 'line', axis: 'valueAxis' }
        ],
        title: {
            text: 'Exports of Good in USA by End-Use Category (2005)'
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        },
        tooltip: {
            enabled: true
        },
        valueAxis: [
            { name: 'percentAxis' },
            { name: 'valueAxis', position: 'right', grid: { color: 'green' }, label: { font: { color: 'green' } } }
        ],
        synchronizeMultiAxes: true
    });

    $("#synchronizeMultiAxesCheckbox").change(function () {
        var chart = $("#chartContainer").dxChart("instance");
        chart.option("synchronizeMultiAxes", this.checked);
    });
});

theme

Sets the name of the theme to be used in the widget.

Type: String
Default Value: 'generic.light'
Accepted Values: 'generic.light' | 'generic.dark' | 'generic.contrast' | 'android5.light' | 'ios7.default' | 'win10.black' | 'win10.white'

Use this property to set a predefined or custom theme. The options defining chart appearance will be set to the values that are set in the specified theme. You can override some of these values within the chart's configuration object.

NOTE: The following themes were deprecated or renamed: 'desktop', 'desktop-dark', 'android', 'android-holo-light', 'ios', 'win8', 'win8-white', 'win8.white', 'win8.black'. In new applications, use themes listed in the accepted values.

Show Example:
jQuery

In this example, a custom theme is defined on the base of the 'generic.light' theme and then applied.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

var myTheme = {
    name: 'mySuperTheme',
    chart: {
        animation: { easing: 'linear' },
        commonAxisSettings: {
            color: 'lightseagreen',
            grid: {
                color: 'mediumaquamarine',
                visible: true
            },
            label: {
                font: { color: 'green' }
            }
        },
        legend: {
            font: { color: 'plum' }
        }
    }
};

DevExpress.viz.registerTheme(myTheme, 'generic.light');

$(function () {
    $("#chartContainer").dxChart({
        theme: 'mySuperTheme',
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        palette: 'Harmony Light'
    });
});

title

Specifies a title for the chart.

Type: Object|String

Use this property to set the text to be displayed as a chart title. If you need to specify the title's position on the chart, assign an object to the title property with the required title options specified. In this instance, set the title's text using the text property. When a text is not specified for a title, the widget is displayed without a title.

Show Example:
jQuery

In the example below, the chart's title text is assigned directly to the title field.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { country: 'China', y014: 320866959, y1564: 853191410, y65: 87774113 },
    { country: 'India', y014: 340419115, y1564: 626520945, y65: 47063757 },
    { country: 'United States', y014: 58554755, y1564: 182172625, y65: 34835293 },
    { country: 'Indonesia', y014: 68715705, y1564: 146014815, y65: 10053690 },
    { country: 'Brazil', y014: 50278034, y1564: 113391494, y65: 9190842 },
    { country: 'Russia', y014: 26465156, y1564: 101123777, y65: 18412243 }
];

var series = [
    { valueField: 'y014', name: '0-14 years' },
    { valueField: 'y1564', name: '15-64 years' },
    { valueField: 'y65', name: '65 years and older' }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'country',
            type: 'fullstackedbar'
        },
        series: series,
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        },
        title: 'Population: Age Structure (2000)'
    });
});

tooltip

Specifies tooltip options.

Type: Object

A tooltip is a small pop-up rectangle that displays information about a hovered series point. You can enable or disable tooltips, format or customize the displayed text, and change the default appearance. Use the properties of the tooltip configuration object to do this. To learn more on tooltips and their options, refer to the Tooltips topic.

Show Example:
jQuery

In this example, tooltips are enabled. Hover over any point to see a tooltip.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 1960, europe: 605, americas: 417, africa: 283 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 2010, europe: 728, americas: 935, africa: 982 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        tooltip: {
            enabled: true
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

useAggregation

Specifies whether or not to filter the series points depending on their quantity.

Type: Boolean
Default Value: false

By default, a chart displays all series points. But there may be situations when displaying all the series points may affect chart performance. In this case, it is better to aggregate the series points rather than display all of them. For this purpose, set the useAggregation option to true. The aggregation is based on the median filter algorithm.

View Demo

Show Example:
jQuery

In this example, the data source is populated with 5000 random values. You can change the value of the useAggregation option using the check box below.

<div id="chartContainer" style="height:400px; max-width:700px; margin: 0 auto"></div>
<div id="checkboxContainer" style="height:20px;width:200px;margin:5px auto;font-family:'Trebuchet MS',Arial,sans-serif;font-size:14px;text-align:center">
    <input type="checkbox" id="useAggregationCheckbox" checked> useAggregation
</div>
var data = [];
var max = 5000;
for (var i = 0; i < max; i++) {
    data.push({ arg: i, val: i + i * (Math.random() - 0.5) });
}

$(function () {
    $("#chartContainer").dxChart({
        dataSource: data,
        series: {},
        argumentAxis: {
            label: { rotate: 90 }
        },
        legend: { visible: false },
        useAggregation: true
    });

    $('#useAggregationCheckbox').change(function () {
        var chart = $('#chartContainer').dxChart('instance');
        chart.option({
            useAggregation: this.checked
        });
    });
});

valueAxis

Specifies value axis options for the dxChart widget.

Type: Object|Array

For charting, the rectangular coordinate system is used to determine each point uniquely on a plane through two numbers, the argument and the value of the point. Two perpendicular lines (the axis of arguments and the axis of values) are specified to define the coordinates. To define the argument axis, use the argumentAxis configuration object. To define the value axis, use the valueAxis configuration object. When series are displayed on several panes, there should be a value axis for each pane defined. In addition, different series can be displayed using different value axes on one pane. In these instances, the valueAxis can be an array of objects representing values axes.

To set the properties of all axes to a common value, use the commonAxisSettings configuration object. It exposes properties that can be specified for all axes simultaneously. Note that the value specified for an axis individually (in the argumentAxis or valueAxis object) overrides the value that specified in the commonAxisSettings object.

View Demo

Show Example:
jQuery

In this example, the value axis' axisDivisionFactor option is set to 15, and the minValueMargin and maxValueMargin options are set to 0.04.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 2050, europe: 650, americas: 1231, africa: 1937 },
    { year: 2040, europe: 680, americas: 1178, africa: 1665 },
    { year: 2030, europe: 704, americas: 1110, africa: 1416 },
    { year: 2020, europe: 721, americas: 1027, africa: 1189 },
    { year: 2010, europe: 728, americas: 935, africa: 982 },
    { year: 2000, europe: 730, americas: 836, africa: 797 },
    { year: 1990, europe: 721, americas: 721, africa: 623 },
    { year: 1980, europe: 694, americas: 614, africa: 471 },
    { year: 1970, europe: 656, americas: 513, africa: 361 },
    { year: 1960, europe: 605, americas: 417, africa: 283 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year'
        },
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        valueAxis: {
            axisDivisionFactor: 15,
            valueMarginsEnabled: true,
            minValueMargin: 0.04,
            maxValueMargin: 0.04,
            visible: true
        }
    });
});

zoomingMode

Enables zooming in your chart.

Type: String
Default Value: 'none'
Accepted Values: 'none' | 'touch' | 'mouse' | 'all'

This option allows you to control the zooming capability in your chart. By default, this capability is off. To make zooming available on touch-enabled devices only, assign 'touch' to the zoomingMode option. In that case, a user will be able to zoom in/out of the chart using the spread/pinch gesture. If your chart is not supposed to be viewed on touch-enabled devices, but you still need zooming to be enabled, assign 'mouse' to the zoomingMode option. In this case, a user will be able to zoom the chart by rolling the mouse wheel. To enable zooming for all devices, assign 'all' to the zoomingMode option.

NOTE: In many cases, zooming is useless without scrolling, and vice versa. Hence, when enabling the zooming capability in your chart, consider enabling the scrolling capability as well.

View Demo