Chart.Crosshairs
Defines chart crosshairs.
Sample configuration:
var crosshairsConfig = {
enabled: true,
hLine: { strokeStyle: '#cc0a0c' },
vLine: { strokeStyle: '#cc0a0c' }
}
Example usage:
$(document).ready(function () {
$('#selector').jqChart({
title: { text: 'Crosshairs' },
tooltips: {
disabled: true,
type: 'shared'
},
crosshairs: {
enabled: true,
hLine: { strokeStyle: '#cc0a0c' },
vLine: { strokeStyle: '#cc0a0c' }
},
series: [
{
type: 'spline',
title: 'Series 1',
data: [[1, 62], [2, 70], [3, 68], [4, 58],
[5, 52], [6, 60], [7, 48], [8, 52],
[9, 54], [10, 47], [11, 49]]
},
{
type: 'spline',
title: 'Series 2',
data: [[1, 56], [2, 30], [3, 62], [4, 65],
[5, 40], [6, 36], [7, 70], [8, 68],
[9, 60], [10, 65], [11, 68]]
}
]
}
}
Defined By
Config options
Specifies whether or not the crosshairs should be enabled. ...
Specifies whether or not the crosshairs should be enabled.
Defaults to: false
Specifies the horizontal line settings. ...
Specifies the horizontal line settings.
Defaults to: {visible: true, strokeStyle: 'red'}