New to Kendo UI for jQuery? Start a free 30-day trial

ValueAxis.crosshair

configuration

The crosshair configuration options.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        crosshair: {
            visible: true,
            color: "red",
            width: 2,
            opacity: 0.8
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The color of the crosshair.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        crosshair: {
            visible: true,
            color: "#0000ff"
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The dash type of the crosshair.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        crosshair: {
            visible: true,
            dashType: "dash"
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The opacity of the crosshair.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        crosshair: {
            visible: true,
            opacity: 0.5
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The crosshair tooltip configuration options.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                background: "#ffffff",
                color: "#000000"
            }
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The dash type of the crosshair.

Default: true

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        crosshair: {
            visible: false
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

The width of the crosshair.

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    valueAxis: {
        crosshair: {
            visible: true,
            width: 3
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>