hoverStyle border

An object defining the border options for a hovered point.

Type: Object

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

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

In case you have to set a hover style option for a point border in an individual series, use the hoverStyle | 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 a hovered point 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 },
    { year: 1970, americas: 513, africa: 361 },
    { year: 1980, europe: 694, americas: 614 },
    { 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,
                hoverStyle: {
                    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' }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

color

Sets a border color for a hovered point.

Type: String
Default Value: undefined

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 a hovered point 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 },
    { year: 1970, americas: 513, africa: 361 },
    { year: 1980, europe: 694, americas: 614 },
    { 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,
                hoverStyle: {
                    border: {
                        visible: true,
                        color: 'mediumseagreen'
                    }
                }
            }
        },
        commonAxisSettings: {
            valueMarginsEnabled: false
        },
        palette: 'Soft Pastel',
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});

visible

Sets border visibility for a hovered point.

Type: Boolean
Default Value: true

Show Example:
jQuery

Use the check box under the chart to change the visibility of the hovered point border.

<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="visibleHoveredPointBorderCheckbox" checked> Show Hovered Point Borders
</div>
var dataSource = [
    { year: 1950, europe: 546, americas: 332, africa: 227 },
    { year: 1960, europe: 605, americas: 417 },
    { year: 1970, americas: 513, africa: 361 },
    { year: 1980, europe: 694, americas: 614 },
    { 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,
                hoverStyle: {
                    border: {
                        visible: true,
                        color: 'lightslategray'
                    }
                }
            }
        },
        commonAxisSettings: {
            valueMarginsEnabled: false
        },
        palette: 'Soft Pastel',
        series: [
            { valueField: 'europe', name: 'Europe' },
            { valueField: 'americas', name: 'Americas' },
            { valueField: 'africa', name: 'Africa' }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });

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

width

Sets a border width for a hovered point.

Type: Number
Default Value: 4

Show Example:
jQuery

In this example, the width option of the hovered 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 },
    { year: 1970, americas: 513, africa: 361 },
    { year: 1980, europe: 694, americas: 614 },
    { 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,
                hoverStyle: {
                    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' }
        ],
        legend: {
            verticalAlignment: 'bottom',
            horizontalAlignment: 'center'
        }
    });
});