axisDefaults.crosshairObject

The crosshair configuration options.

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

Example - set the default crosshair configuration options

<div id="chart"></div>
<script>
$("#chart").kendoChart({
  axisDefaults: {
    crosshair: {
      color: "green",
      width: 2,
      zIndex:1,
      visible: true
    }
  },
  series: [
    { type: "column", data: [[1, 2], [3, 4], [4, 5]] }
  ]
});
</script>

axisDefaults.crosshair.colorString

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

axisDefaults.crosshair.dashTypeString(default: "solid")

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

axisDefaults.crosshair.opacityNumber(default: 1)

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

axisDefaults.crosshair.tooltipObject

The crosshair tooltip options.

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

axisDefaults.crosshair.tooltip.backgroundString

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

axisDefaults.crosshair.tooltip.borderObject

The border options.

axisDefaults.crosshair.tooltip.border.colorString(default: "black")

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

axisDefaults.crosshair.tooltip.border.dashTypeString(default: "solid")

This option is ignored and deprecated.

axisDefaults.crosshair.tooltip.border.widthNumber(default: 0)

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

axisDefaults.crosshair.tooltip.colorString

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

axisDefaults.crosshair.tooltip.fontString(default: "12px Arial,Helvetica,sans-serif")

The tooltip font.

axisDefaults.crosshair.tooltip.formatString(default: "{0}")

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

axisDefaults.crosshair.tooltip.paddingNumber|Object(default: 0)

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

axisDefaults.crosshair.tooltip.padding.bottomNumber(default: 0)

The bottom padding of the crosshair tooltip.

axisDefaults.crosshair.tooltip.padding.leftNumber(default: 0)

The left padding of the crosshair tooltip.

axisDefaults.crosshair.tooltip.padding.rightNumber(default: 0)

The right padding of the crosshair tooltip.

axisDefaults.crosshair.tooltip.padding.topNumber(default: 0)

The top padding of the crosshair tooltip.

axisDefaults.crosshair.tooltip.templateString|Function

The template which renders the tooltip.

The fields which can be used in the template are:

  • value - the category value

axisDefaults.crosshair.tooltip.visibleBoolean(default: false)

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

axisDefaults.crosshair.visibleBoolean(default: false)

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

axisDefaults.crosshair.widthNumber(default: 1)

The width of the crosshair in pixels.