categoryAxis.notes.data.labelObject
The label of the note.
Example
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: new Date(2023, 0, 1), value: 100 },
{ date: new Date(2023, 0, 2), value: 105 },
{ date: new Date(2023, 0, 3), value: 98 }
]
},
categoryAxis: {
notes: {
data: [{
value: new Date(2023, 0, 2),
label: {
text: "Important Point",
background: "yellow",
border: { width: 1, color: "black" },
color: "black",
font: "12px Arial",
visible: true
}
}]
}
},
series: [{
field: "value",
categoryField: "date"
}]
});
</script>
categoryAxis.notes.data.label.backgroundString
The background color of the label. Accepts a valid CSS color string, including hex and rgb.
Example - set the category axis note label background
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notesdata: {
data: [{
value: 1,
label: {
background: "red"
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.borderObject
The border of the label.
Example - set the category axis note label border
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
border: {
color: "green",
dashType: "dashDot",
width: 1
}
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.border.colorString(default: "black")
The color of the border. Accepts a valid CSS color string, including hex and rgb.
Example - set the category axis note label border color
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
border: {
color: "green"
}
}
}]
}
}
});
</script>
categoryAxis.notes.data.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 - set the category axis note label border dash type
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
border: {
dashType: "dashDot",
width: 1
}
}
}]
}
}
});
</script>
categoryAxis.notes.data.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 - set the category axis note label border width
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
border: {
width: 1
}
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.colorString
The text color of the note label. Accepts a valid CSS color string, including hex and rgb.
Example - set the category axis note label color as a hex string
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
color: "#aa00bb"
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.fontString(default: "12px Arial,Helvetica,sans-serif")
The font style of the note label.
Example - set the category axis note label font
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
font: "20px sans-serif"
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.templateString|Function
The template which renders the labels.
The fields which can be used in the template are:
- value - the category value
Example - set the category axis note label template as a string
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
template: "Year: #: value #"
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.visibleBoolean(default: true)
If set to true the chart will display the category notes label. By default the category notes label are visible.
Example - hide the category axis note label
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
visible: false
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.rotationNumber(default: 0)
The rotation angle of the label. By default the label are not rotated.
Example - rotate the category axis note label
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
rotation: 90
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.formatString(default: "{0}")
The format used to display the note label. Uses kendo.format. Contains one placeholder ("{0}") which represents the category value.
Example - set the category axis note label format
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
format: "Category slot: {0}"
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.textString
The label note text.
Example - set the category axis label note text
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
categoryAxis: {
notes: {
data: [{
value: 1,
label: {
text: "A"
}
}]
}
}
});
</script>
categoryAxis.notes.data.label.positionString(default: "inside")
The position of the category axis note label.
- "inside" - the label is positioned inside of the icon.
- "outside" - the label is positioned outside of the icon.
Example
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: new Date(2023, 0, 1), value: 100 },
{ date: new Date(2023, 0, 2), value: 105 },
{ date: new Date(2023, 0, 3), value: 98 }
]
},
categoryAxis: {
notes: {
data: [{
value: new Date(2023, 0, 2),
label: {
text: "Outside Label",
position: "outside"
}
}]
}
},
series: [{
field: "value",
categoryField: "date"
}]
});
</script>