selectionStyle border

An object defining the border options for a seleted point.

To set custom border settings specific to the 'selected' state for points in all series at once, use the properties of the commonSeriesSettings | point | selectionStyle | border configuration object.

To set custom border settings specific to the 'selected' state for points in all series of a single type at once, use the properties of the corresponding object within commonSeriesSettings (e.g. area | selectionStyle | border). The values that are set within this object override the corresponding common values that are set within the root commonSeriesSettings | selectionStyle | border object.

In case you have to set a selection style option for a point border in an individual series, use the selectionStyle | border object within the series object of the series array. The values that are set individually override corresponding common values.

Show Example:
jQuery

In this example, the border of the selected points is colored in paleturquoise and has a 2-pixel width.

<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',
            type: 'area',
            point: {
                visible: true,
                selectionMode: 'allSeriesPoints',
                selectionStyle: {
                    border: {
                        visible: true,
                        color: 'paleturquoise',
                        width: 2
                    }
                }
            }
        },
        commonAxisSettings: {
            valueMarginsEnabled: false
        },
        palette: 'Soft Pastel',
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        pointClick: function (clickedPoint) {
            clickedPoint.fullState & 2 ? clickedPoint.clearSelection() : clickedPoint.select();
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

color

Sets a border color for a selected point.

This option supports the following colors.

  • hexadecimal colors
  • RGB colors
  • RGBA colors (not supported in Internet Explorer 8)
  • predefined/cross-browser color names
  • predefined SVG colors (not supported in Internet Explorer 8)
Show Example:
jQuery

In this example, the border of the selected points is colored in mediumseagreen.

<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',
            type: 'area',
            point: {
                visible: true,
                selectionMode: 'allSeriesPoints',
                selectionStyle: {
                    border: {
                        visible: true,
                        color: 'mediumseagreen'
                    }
                }
            }
        },
        commonAxisSettings: {
            valueMarginsEnabled: false
        },
        palette: 'Soft Pastel',
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        pointClick: function (clickedPoint) {
            clickedPoint.fullState & 2 ? clickedPoint.clearSelection() : clickedPoint.select();
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

visible

Sets a border visibility for a selected point.

Show Example:
jQuery

Use the check box under the chart to change the visibility of the selected point borders.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
<div id="checkboxContainer" style="height:40px;width:250px;margin:5px auto;font-family:'Trebuchet MS',Arial,sans-serif;font-size:14px;text-align:center">
    <input type="checkbox" id="visibleSelectedPointBorderCheckbox" checked> Show Selected Point Borders
</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',
            type: 'area',
            point: {
                visible: true,
                selectionMode: 'allSeriesPoints',
                selectionStyle: {
                    border: {
                        visible: true,
                        color: 'lightslategray'
                    }
                }
            }
        },
        commonAxisSettings: {
            valueMarginsEnabled: false
        },
        palette: 'Soft Pastel',
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        pointClick: function (clickedPoint) {
            clickedPoint.fullState & 2 ? clickedPoint.clearSelection() : clickedPoint.select();
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });

    $('#visibleSelectedPointBorderCheckbox').change(function () {
        var chart = $('#chartContainer').dxChart('instance');
        chart.option({
            commonSeriesSettings: {
                point: {
                    selectionStyle: {
                        border: { visible: this.checked }
                    }
                }
            }
        });
    });
});

width

Sets a border width for a selected point.

Show Example:
jQuery

In this example, the width option of the selected point border is set to 2.

<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',
            type: 'area',
            point: {
                visible: true,
                selectionMode: 'allSeriesPoints',
                selectionStyle: {
                    border: {
                        visible: true,
                        color: 'lightslategray',
                        width: 2
                    }
                }
            }
        },
        commonAxisSettings: {
            valueMarginsEnabled: false
        },
        palette: 'Soft Pastel',
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        pointClick: function (clickedPoint) {
            clickedPoint.fullState & 2 ? clickedPoint.clearSelection() : clickedPoint.select();
        },
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});