yAxis.title Object
The title configuration of the scatter chart y axis.
The yAxis.title.text option must be set in order to display the title.
Example - set the scatter chart y axis title
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: {
title: {
text: "Years",
background: "green",
border: {
width: 1,
}
}
},
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.background String
The background color of the title. Accepts a valid CSS color string, including hex and rgb.
Example - set the scatter chart y axis title background
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: {
title: {
text: "Years",
background: "green"
}
},
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.border Object
The border of the title.
Example - set the scatter chart y axis title border
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
border: {
color: "green",
dashType: "dashDot",
width: 1
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.border.color String
(default: "black")
The color of the border. Accepts a valid CSS color string, including hex and rgb.
Example - set the scatter chart y axis title border color
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
border: {
color: "green",
width: 1
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.border.dashType String
(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 scatter chart y axis title border dash type
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
border: {
dashType: "dashDot",
width: 1
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.border.width Number
(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 scatter chart y axis title border width
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
border: {
width: 1
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.color String
The text color of the title. Accepts a valid CSS color string, including hex and rgb.
Example - set the scatter chart y axis title color as a hex string
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: {
title: {
text: "Years",
color: "#aa00bb"
}
},
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
Example - set the scatter chart y axis title color as a RGB value
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: {
title: {
text: "Years",
color: "rgb(128, 0, 255)"
}
},
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
Example - set the scatter chart y axis title color by name
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: {
title: {
text: "Years",
color: "green"
}
},
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.font String
(default: "16px Arial,Helvetica,sans-serif")
The font style of the title.
Example - set the scatter chart y axis title font
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
font: "20px sans-serif",
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.margin Number|Object
(default: 5)
The margin of the title. A numeric value will set all margins.
Example - set the scatter chart y axis title margin as a number
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
margin: 20
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.margin.bottom Number
(default: 0)
The bottom margin of the title.
Example - set the scatter chart y axis title bottom margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
margin: {
bottom: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.margin.left Number
(default: 0)
The left margin of the title.
Example - set the scatter chart y axis title left margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
margin: {
left: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.margin.right Number
(default: 0)
The right margin of the title.
Example - set the scatter chart y axis title right margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
margin: {
right: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.margin.top Number
(default: 0)
The top margin of the title.
Example - set the scatter chart y axis title top margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
margin: {
top: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.padding Number|Object
(default: 0)
The padding of the title. A numeric value will set all paddings.
Example - set the scatter chart y axis title padding as a number
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
padding: 20
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.padding.bottom Number
(default: 0)
The bottom padding of the title.
Example - set the scatter chart y axis title bottom padding
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
padding: {
bottom: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.padding.left Number
(default: 0)
The left padding of the title.
Example - set the scatter chart y axis title left padding
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
padding: {
left: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.padding.right Number
(default: 0)
The right padding of the title.
Example - set the scatter chart y axis title right padding
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
padding: {
right: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.padding.top Number
(default: 0)
The top padding of the title.
Example - set the scatter chart y axis title top padding
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
padding: {
top: 20
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.position String
(default: "center")
The position of the title.
The supported values are:
- "top" - the axis title is positioned on the top (applicable to vertical axis)
- "bottom" - the axis title is positioned on the bottom (applicable to vertical axis)
- "left" - the axis title is positioned on the left (applicable to horizontal axis)
- "right" - the axis title is positioned on the right (applicable to horizontal axis)
- "center" - the axis title is positioned in the center
Example - set the scatter chart y axis title position
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: {
title: {
text: "Years",
position: "left"
}
},
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.rotation Number
(default: 0)
The rotation angle of the title. By default the title is not rotated.
Example - rotate the scatter chart y axis title
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
rotation: 90
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.text String
The text of the title.
The text can be split into multiple lines by using line feed characters ("\n").
Example - set the scatter chart y axis title text
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years"
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.visible Boolean
(default: true)
If set to true
the chart will display the scatter chart y axis title. By default the scatter chart y axis title is visible.
Example - hide the scatter chart y axis title
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "Years",
visible: false
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>
yAxis.title.visual Function
A function that can be used to create a custom visual for the title. The available argument fields are:
- text - the label text.
- rect - the
kendo.geometry.Rect
that defines where the visual should be rendered. - sender - the chart instance (may be undefined).
- options - the label options.
- createVisual - a function that can be used to get the default visual.
Example - using custom visual for the title
<div id="chart"></div>
<script>
$("#chart").kendoChart({
yAxis: [{
title: {
text: "foo bar",
visual: function (e) {
var layout = new kendo.drawing.Layout(e.rect, {
orientation: "vertical",
justifyContent: "center"
});
var words = e.text.split(" ");
for (var i = 0; i < words.length; i++) {
layout.append(new kendo.drawing.Text(words[i]));
}
layout.reflow();
return layout;
}
}
}],
series: [
{ type: "scatter", data: [[1, 2]] }
]
});
</script>