hoverStyle border

An object defining the border options for a hovered series.

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

To set custom border settings specific to the 'hovered' state for 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 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 series is colored in rosybrown.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1990, istanbul: 7620000, moscow: 8967332, london: 6887280, sp: 5035200, ankara: 2583963 },
    { year: 2000, istanbul: 10923000, moscow: 10382754, london: 8173941, sp: 4694000, ankara: 3703362 },
    { year: 2012, istanbul: 13854740, moscow: 11689048, london: 8308369, sp: 5028000, ankara: 4965542 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'bar',
            hoverStyle: {
                border: {
                    visible: true,
                    color: 'rosybrown'
                }
            }
        },
        series: [
            { valueField: 'istanbul', name: 'Istanbul, Turkey' },
            { valueField: 'moscow', name: 'Moscow, Russia' },
            { valueField: 'london', name: 'London, UK' },
            { valueField: 'sp', name: 'Saint Petersburg, Russia' },
            { valueField: 'ankara', name: 'Ankara, Turkey' }
        ],
        palette: 'Soft Pastel',
        title: 'Largest Cities in Europe',
        argumentAxis: { type: 'discrete' },
        valueAxis: {
            label: { format: 'largeNumber' },
            title: {
                text: 'Population within borders',
                font: { weight: 100 }
            }
        },
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        }
    });
});

color

Sets a border color for a hovered series.

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 series is colored in lightpink.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1990, istanbul: 7620000, moscow: 8967332, london: 6887280, sp: 5035200, ankara: 2583963 },
    { year: 2000, istanbul: 10923000, moscow: 10382754, london: 8173941, sp: 4694000, ankara: 3703362 },
    { year: 2012, istanbul: 13854740, moscow: 11689048, london: 8308369, sp: 5028000, ankara: 4965542 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'bar',
            hoverStyle: {
                border: {
                    visible: true,
                    color: 'darkseagreen'
                }
            }
        },
        series: [
            { valueField: 'istanbul', name: 'Istanbul, Turkey' },
            { valueField: 'moscow', name: 'Moscow, Russia' },
            { valueField: 'london', name: 'London, UK' },
            { valueField: 'sp', name: 'Saint Petersburg, Russia' },
            { valueField: 'ankara', name: 'Ankara, Turkey' }
        ],
        palette: 'Soft Pastel',
        title: 'Largest Cities in Europe',
        argumentAxis: { type: 'discrete' },
        valueAxis: {
            label: { format: 'largeNumber' },
            title: {
                text: 'Population within borders',
                font: { weight: 100 }
            }
        },
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        }
    });
});

visible

Sets a border visibility for a hovered series.

Type: Boolean
Default Value: false
Accepted Values: true|false

Show Example:
jQuery

Use the check box to change the visibility of the border for a hovered series. Hover over a series to see the effect.

<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="visibleBorderCheckbox" checked> Show Border for a Hovered Series
</div>
var dataSource = [
    { year: 1990, istanbul: 7620000, moscow: 8967332, london: 6887280, sp: 5035200, ankara: 2583963 },
    { year: 2000, istanbul: 10923000, moscow: 10382754, london: 8173941, sp: 4694000, ankara: 3703362 },
    { year: 2012, istanbul: 13854740, moscow: 11689048, london: 8308369, sp: 5028000, ankara: 4965542 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'bar',
            hoverStyle: {
                border: {
                    visible: true,
                    color: 'forestgreen'
                }
            }
        },
        series: [
            { valueField: 'istanbul', name: 'Istanbul, Turkey' },
            { valueField: 'moscow', name: 'Moscow, Russia' },
            { valueField: 'london', name: 'London, UK' },
            { valueField: 'sp', name: 'Saint Petersburg, Russia' },
            { valueField: 'ankara', name: 'Ankara, Turkey' }
        ],
        palette: 'Soft Pastel',
        title: 'Largest Cities in Europe',
        argumentAxis: { type: 'discrete' },
        valueAxis: {
            label: { format: 'largeNumber' },
            title: {
                text: 'Population within borders',
                font: { weight: 100 }
            }
        },
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        }
    });

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

width

Sets a border width for a hovered series.

Show Example:
jQuery

In this example, the border of a hovered series is colored in rosybrown and has a 4-pixel width.

<div id="chartContainer" style="height:500px; max-width:700px; margin: 0 auto"></div>
var dataSource = [
    { year: 1990, istanbul: 7620000, moscow: 8967332, london: 6887280, sp: 5035200, ankara: 2583963 },
    { year: 2000, istanbul: 10923000, moscow: 10382754, london: 8173941, sp: 4694000, ankara: 3703362 },
    { year: 2012, istanbul: 13854740, moscow: 11689048, london: 8308369, sp: 5028000, ankara: 4965542 }
];

$(function () {
    $("#chartContainer").dxChart({
        dataSource: dataSource,
        commonSeriesSettings: {
            argumentField: 'year',
            type: 'bar',
            hoverStyle: {
                border: {
                    visible: true,
                    color: 'rosybrown',
                    width: 4
                }
            }
        },
        series: [
            { valueField: 'istanbul', name: 'Istanbul, Turkey' },
            { valueField: 'moscow', name: 'Moscow, Russia' },
            { valueField: 'london', name: 'London, UK' },
            { valueField: 'sp', name: 'Saint Petersburg, Russia' },
            { valueField: 'ankara', name: 'Ankara, Turkey' }
        ],
        palette: 'Soft Pastel',
        title: 'Largest Cities in Europe',
        argumentAxis: { type: 'discrete' },
        valueAxis: {
            label: { format: 'largeNumber' },
            title: {
                text: 'Population within borders',
                font: { weight: 100 }
            }
        },
        legend: {
            horizontalAlignment: 'center',
            verticalAlignment: 'bottom'
        }
    });
});