categoryAxis.crosshairObject

The crosshair configuration options.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            color: "red",
            width: 2,
            opacity: 0.8,
            dashType: "dash"
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.colorString

The color of the crosshair.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            color: "blue"
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.widthNumber

The width of the crosshair.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            width: 3
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.opacityNumber

The opacity of the crosshair.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            opacity: 0.5
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.dashTypeNumber

The dash type of the crosshair.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            dashType: "dot"
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.visibleBoolean(default: false)

The dash type of the crosshair.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.tooltipObject

The crosshair tooltip configuration options.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                background: "lightblue",
                color: "darkblue"
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.tooltip.backgroundString

The background color of the tooltip.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                background: "yellow"
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.tooltip.borderObject

The border configuration options.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                border: {
                    color: "red",
                    width: 2
                }
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

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

The color of the border.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                border: {
                    color: "green"
                }
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

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

The width of the border.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                border: {
                    width: 3
                }
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.tooltip.colorString

The text color of the tooltip.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                color: "white",
                background: "black"
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

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

The tooltip font.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true,
                font: "14px Arial"
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

categoryAxis.crosshair.tooltip.formatString

The tooltip format.

Example

js
//sets format of the tooltip
format: "C"

categoryAxis.crosshair.tooltip.paddingNumber|Object

The padding of the tooltip.

Example

js
// sets the top, right, bottom and left padding to 3px.
padding: 3

// sets the top and left padding to 1px
// right and bottom padding are left at their default values
padding: { top: 1, left: 1 }

categoryAxis.crosshair.tooltip.templateString|Function

The tooltip template. Template variables:

  • value- the point value (either a number or an object)

Example

js
$("#sparkline").kendoSparkline({
     type: "area",
     data: [200, 450, 300, 125],
     categoryAxis: {
         crosshair: {
             tooltip: {
                 template: "|#= value #|"
             }
         }
     }
});

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

A value indicating if the tooltip should be displayed.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    categoryAxis: {
        crosshair: {
            visible: true,
            tooltip: {
                visible: true
            }
        },
        categories: ["Q1", "Q2", "Q3", "Q4"]
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>