series.notes.labelObject
The label of the notes.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
background: "yellow",
color: "black",
font: "12px Arial"
}
}
}]
});
</script>
series.notes.label.backgroundString
The background color of the label. Accepts a valid CSS color string, including hex and rgb.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
background: "lightgreen"
}
}
}]
});
</script>
series.notes.label.borderObject
The border of the label.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
border: {
color: "red",
width: 2,
dashType: "solid"
}
}
}
}]
});
</script>
series.notes.label.border.colorString(default: "black")
The color of the border. Accepts a valid CSS color string, including hex and rgb.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
border: {
color: "blue"
}
}
}
}]
});
</script>
series.notes.label.border.dashTypeString(default: "solid")
The dash type of the border.
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="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
border: {
dashType: "dash",
color: "red",
width: 2
}
}
}
}]
});
</script>
series.notes.label.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.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
border: {
width: 3,
color: "red"
}
}
}
}]
});
</script>
series.notes.label.colorString
The text color of the label. Accepts a valid CSS color string, including hex and rgb.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
color: "blue"
}
}
}]
});
</script>
series.notes.label.fontString(default: "12px Arial,Helvetica,sans-serif")
The font style of the label.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
font: "16px Arial, sans-serif"
}
}
}]
});
</script>
series.notes.label.templateString|Function
The template which renders the labels.
The fields which can be used in the template are:
- value - the point value
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
template: (data) => `Value: ${data.value}`
}
}
}]
});
</script>
series.notes.label.visibleBoolean(default: true)
If set to true the chart will display the series notes label. By default the series notes label are visible.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
visible: false
}
}
}]
});
</script>
series.notes.label.rotationNumber(default: 0)
The rotation angle of the label. By default the label are not rotated.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
rotation: 45
}
}
}]
});
</script>
series.notes.label.formatString(default: "{0}")
The format used to display the notes label. Uses kendo.format. Contains one placeholder ("{0}") which represents the axis value.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
format: "Value: {0}"
}
}
}]
});
</script>
series.notes.label.positionString(default: "inside")
The position of the labels.
- "inside" - the label is positioned inside of the icon.
- "outside" - the label is positioned outside of the icon.
Example
<div id="sparkline"></div>
<script>
$("#sparkline").kendoSparkline({
type: "line",
series: [{
data: [10, 15, 8, 12],
notes: {
data: [{
value: 15,
text: "Peak Value"
}],
label: {
position: "outside"
}
}
}]
});
</script>