panes.title String|Object
The title configuration of the chart pane.
The panes.title.text option must be set in order to display the title.
Example - set the chart pane title
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom"
}
}
]
});
</script>
panes.title.background String
The background color of the title. Accepts a valid CSS color string, including hex and rgb.
Example - set the chart pane title background
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
background: "red"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
background: "green"
}
}
]
});
</script>
panes.title.border Object
The border of the title.
Example - set the chart pane title border
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
border: {
color: "red",
width: 2
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
border: {
color: "green",
width: 2
}
}
}
]
});
</script>
panes.title.border.color String
(default: "black")
The color of the border. Accepts a valid CSS color string, including hex and rgb.
Example - set the chart pane title border color
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
border: {
color: "red",
width: 2
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
border: {
color: "green",
width: 2
}
}
}
]
});
</script>
panes.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 chart pane title border dashType
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
border: {
dashType: "dashDot",
width: 2
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
border: {
dashType: "dashDot",
width: 2
}
}
}
]
});
</script>
panes.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 category axis title border width
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
border: {
width: 2
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
border: {
width: 2
}
}
}
]
});
</script>
panes.title.color String
The text color of the title. Accepts a valid CSS color string, including hex and rgb.
Example - set the chart pane title color as a hex string
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
color: "#aa00bb"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
color: "#a0b0c0"
}
}
]
});
</script>
Example - set the chart pane title color as a RGB value
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
color: "rgb(128, 0, 255)"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
color: "rgb(128, 0, 255)"
}
}
]
});
</script>
Example - set the chart pane title color by name
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
color: "red"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
color: "green"
}
}
]
});
</script>
panes.title.font String
(default: "700 18px Arial,Helvetica,sans-serif")
The font style of the title.
Example - set the chart pane title font
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
font: "20px sans-serif"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
color: "green"
}
}
]
});
</script>
panes.title.margin Number|Object
(default: 5)
The margin of the title. A numeric value will set all margins.
Example - set the chart pane title margin as a number
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
margin: 10
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
margin: 10
}
}
]
});
</script>
panes.title.margin.bottom Number
(default: 0)
The bottom margin of the title.
Example - set the chart pane title bottom margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
margin: {
bottom: 10
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
margin: {
bottom: 10
}
}
}
]
});
</script>
panes.title.margin.left Number
(default: 0)
The left margin of the title.
Example - set the chart pane title left margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
margin: {
left: 10
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
margin: {
left: 10
}
}
}
]
});
</script>
panes.title.margin.right Number
(default: 0)
The right margin of the title.
Example - set the chart pane title right margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
margin: {
right: 10
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
margin: {
right: 10
}
}
}
]
});
</script>
panes.title.margin.top Number
(default: 0)
The top margin of the title.
Example - set the chart pane title top margin
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
margin: {
top: 10
}
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
margin: {
top: 10
}
}
}
]
});
</script>
panes.title.position String
(default: "center")
The position of the title.
The supported values are:
- "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 chart pane title position
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
position: "left"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
position: "left"
}
}
]
});
</script>
panes.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 chart pane title text
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top"
}
},
{ name: "bottom-pane",
title: {
text: "Bottom"
}
}
]
});
</script>
panes.title.visible Boolean
(default: true)
If set to true
the chart will display the pane title. By default the pane title is visible.
Example - hide the chart pane title
<div id="chart"></div>
<script>
$("#chart").kendoChart({
series: [
{ data: [1, 2, 3] },
{ data: [1, 2, 3, 4], axis: "bottom" }
],
valueAxis: [
{ pane: "top-pane" },
{ pane: "bottom-pane", name: "bottom" }
],
panes: [
{ name: "top-pane",
title: {
text: "Top",
visible: false
}
},
{ name: "bottom-pane",
title: {
text: "Bottom",
visible: false
}
}
]
});
</script>
panes.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({
series: [
{ data: [1, 2, 3] }
],
panes: [{
title: {
text: "foo bar",
visual: function (e) {
var layout = new kendo.drawing.Layout(e.rect, {
orientation: "vertical",
alignContent: "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;
}
}
}]
});
</script>