The crosshair configuration options.

The crosshair is displayed when the categoryAxis.crosshair.visible option is set to true.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                color: "red",
                width: 2
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The color of the crosshair. Accepts a valid CSS color string, including hex and rgb.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                color: "blue"
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The dash type of the crosshair.

The following dash types are supported:

  • "dash" - a line consisting of dashes
  • "dashDot" - a line consisting of a repeating pattern of dash-dot
  • "dot" - a line consisting of dots
  • "longDash" - a line consisting of a repeating pattern of long-dash
  • "longDashDot" - a line consisting of a repeating pattern of long-dash-dot
  • "longDashDotDot" - a line consisting of a repeating pattern of long-dash-dot-dot
  • "solid" - a solid line

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                dashType: "dash"
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The opacity of the crosshair. By default the crosshair is opaque.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                opacity: 0.5
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The crosshair tooltip options.

The crosshair tooltip is displayed when the categoryAxis.crosshair.tooltip.visible option is set to true.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    background: "yellow",
                    color: "black"
                }
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The background color of the tooltip. Accepts a valid CSS color string, including hex and rgb.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    background: "lightblue"
                }
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The border options.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    border: {
                        color: "red",
                        width: 2
                    }
                }
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The color of the border. Accepts a valid CSS color string, including hex and rgb.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    border: {
                        color: "green"
                    }
                }
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

This option is ignored and deprecated.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    border: {
                        dashType: "dash"
                    }
                }
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The width of the border in pixels. By default the border width is set to zero which means that the border will not appear.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [
            { date: new Date("2023/1/1"), value: 100 },
            { date: new Date("2023/1/2"), value: 105 },
            { date: new Date("2023/1/3"), value: 102 }
        ]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    border: {
                        width: 3
                    }
                }
            }
        },
        series: {
            type: "line",
            field: "value"
        }
    },
    series: [{
        field: "value",
        type: "line"
    }]
});
</script>

The text color of the tooltip. Accepts a valid CSS color string, including hex and rgb.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    color: "red"
                }
            }
        }
    }
});
</script>

The tooltip font.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    font: "14px Arial"
                }
            }
        }
    }
});
</script>

The format used to display the tooltip. Uses kendo.format. Contains one placeholder ("{0}") which represents the category value.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    format: "Date: {0:yyyy/MM/dd}"
                }
            }
        }
    }
});
</script>

The padding of the crosshair tooltip. A numeric value will set all paddings.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    padding: 10
                }
            }
        }
    }
});
</script>

The bottom padding of the crosshair tooltip.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    padding: {
                        bottom: 10
                    }
                }
            }
        }
    }
});
</script>

The left padding of the crosshair tooltip.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    padding: {
                        left: 10
                    }
                }
            }
        }
    }
});
</script>

The right padding of the crosshair tooltip.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    padding: {
                        right: 10
                    }
                }
            }
        }
    }
});
</script>

The top padding of the crosshair tooltip.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    padding: {
                        top: 10
                    }
                }
            }
        }
    }
});
</script>

The template which renders the tooltip.

The fields which can be used in the template are:

  • value - the category value

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true,
                    template: (data) => `Value: ${data.value}`
                }
            }
        }
    }
});
</script>

If set to true the chart will display the category axis crosshair tooltip. By default the category axis crosshair tooltip is not visible.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                tooltip: {
                    visible: true
                }
            }
        }
    }
});
</script>

If set to true the chart will display the category axis crosshair. By default the category axis crosshair is not visible.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true
            }
        }
    }
});
</script>

The width of the crosshair in pixels.

Example

<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
    dataSource: {
        data: [{
            date: new Date("2016/01/01"),
            open: 41.62,
            high: 41.69,
            low: 39.81,
            close: 40.12,
            volume: 2632000
        }]
    },
    navigator: {
        categoryAxis: {
            crosshair: {
                visible: true,
                width: 3
            }
        }
    }
});
</script>