valueAxis.notes.labelObject
The label of the notes.
Example
<div id="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: new Date("2023/1/1"), open: 100, high: 110, low: 95, close: 105 },
{ date: new Date("2023/1/2"), open: 105, high: 115, low: 100, close: 110 }
]
},
dateField: "date",
valueAxis: {
notes: {
data: [{
value: 105,
label: {
text: "Important level",
background: "yellow",
color: "black",
visible: true
}
}]
}
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>
valueAxis.notes.label.backgroundString
The background color of the label. Accepts a valid CSS color string, including hex and rgb.
Example - set the value axis label background
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
background: "red"
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.notes.label.borderObject
The border of the label.
Example - set the value axis label border
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
border: {
color: "green",
dashType: "dashDot",
width: 1
}
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.notes.label.border.colorString(default: "black")
The color of the border. Accepts a valid CSS color string, including hex and rgb.
Example - set the value axis label border color
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
border: {
color: "green"
}
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.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 - set the value axis label border dash type
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
border: {
dashType: "dashDot",
width: 1
}
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.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 - set the value axis label border width
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
border: {
width: 1
}
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.notes.label.colorString
The text color of the label. Accepts a valid CSS color string, including hex and rgb.
Example - set the value axis label color as a hex string
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
color: "#aa00bb"
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.notes.label.fontString(default: "12px Arial,Helvetica,sans-serif")
The font style of the label.
Example - set the chart series label font
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
font: "20px sans-serif"
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.notes.label.templateString|Function
The template which renders the labels.
The fields which can be used in the template are:
- value - the value value
Example - set the value axis notes label template as a string
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
template: "Year: #: value #"
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.notes.label.visibleBoolean(default: true)
If set to true the chart will display the value axis notes label. By default the value axis notes label are visible.
Example - hide the value axis notes label
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
visible: false
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.notes.label.rotationNumber(default: 0)
The rotation angle of the label. By default the label are not rotated.
Example - rotate the value axis notes label
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
rotation: 90
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.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 - set the value axis notes label format
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [{
data: [1, 2, 3]
}],
valueAxis: {
notes: {
label: {
format: "value slot: {0}"
},
data: [{ value: 1 }]
}
}
});
</script>
valueAxis.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="stock-chart"></div>
<script>
$("#stock-chart").kendoStockChart({
dataSource: {
data: [
{ date: new Date("2023/1/1"), open: 100, high: 110, low: 95, close: 105 },
{ date: new Date("2023/1/2"), open: 105, high: 115, low: 100, close: 110 }
]
},
dateField: "date",
valueAxis: {
notes: {
data: [{
value: 105,
label: {
text: "Important level",
position: "outside"
}
}]
}
},
series: [{
type: "candlestick",
openField: "open",
highField: "high",
lowField: "low",
closeField: "close"
}]
});
</script>