seriesDefaults.tooltipObject

The data point tooltip configuration options.

Example

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

seriesDefaults.tooltip.backgroundString

The background color of the tooltip. The default is determined from the series color.

Example

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

seriesDefaults.tooltip.borderObject

The border configuration options.

Example

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

seriesDefaults.tooltip.border.colorString(default: "black")

The color of the border.

Example

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

seriesDefaults.tooltip.border.widthNumber(default: 0)

The width of the border.

Example

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

seriesDefaults.tooltip.colorString

The text color of the tooltip. The default is the same as the series labels color.

Example

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

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

The tooltip font.

Example

<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
    type: "column",
    seriesDefaults: {
        tooltip: {
            visible: true,
            font: "16px Arial, sans-serif"
        }
    },
    series: [{
        data: [10, 15, 8, 12]
    }]
});
</script>

seriesDefaults.tooltip.formatString

The tooltip format.

Example

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

seriesDefaults.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 }

seriesDefaults.tooltip.templateString|Function

The tooltip template. Template variables:

  • value- the point value
  • category- the category name
  • series- the data series
  • dataItem- the original data item used to construct the point. Will be null if binding to array.

Example

js
$("#sparkline").kendoSparkline({
    data: [200, 450, 300, 125],
     seriesDefaults: {
         tooltip: {
             visible: true,
             template: "#= value #"
         }
     }
});

seriesDefaults.tooltip.visibleBoolean(default: false)

A value indicating if the tooltip should be displayed.

Example

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