Title and Subtitle
The Chart provides built-in support for a title and a subtitle. Use these components to label the Chart and provide context such as time period, units, or data source.
Configuring the Title and Subtitle
To add a title, include the kendo-chart-title component inside the kendo-chart tag. Set its text property to define the displayed value.
<kendo-chart>
<kendo-chart-title text="Quarterly Revenue"></kendo-chart-title>
</kendo-chart>
To add a subtitle, include the kendo-chart-subtitle component. The subtitle renders below the title by default and provides secondary context such as units or a date range. Set its text property to define the displayed value.
<kendo-chart>
<kendo-chart-title text="Quarterly Revenue"></kendo-chart-title>
<kendo-chart-subtitle text="In millions of dollars"></kendo-chart-subtitle>
</kendo-chart>
The following example demonstrates a Chart with both a title and a subtitle.
Positioning the Title and Subtitle
Both the title and subtitle support properties that control their placement within the Chart:
position—Renders the element at thetoporbottomof the Chart. The default value istop.align—Sets the horizontal alignment toleft,center, orright.padding—Defines the inner spacing around the text in pixels.margin—Defines the outer spacing around the element in pixels.
The following example demonstrates how to adjust the placement of the title and subtitle.
Customizing the Title and Subtitle Appearance
Both the title and subtitle support properties that control their visual style:
color—Sets the text color.background—Sets the background color.font—Specifies the CSS font string, for examplebold 18px Arial.border—Defines the border color and width.visible—Controls whether the element renders.
The following example demonstrates how to customize the title and subtitle appearance.
Support and Learning Resources
- Getting Started with the Kendo UI for Angular Chart
- API Reference of the Chart
- TitleComponent API
- SubtitleComponent API
- Axes
- Chart Area
- Crosshairs
- Error Bars
- Labels
- Legend
- Notes
- Panes
- Plot Area
- Plot Bands
- Selection
- Series
- Tooltip
- Getting Started with Kendo UI for Angular (Online Guide)
- Getting Started with Kendo UI for Angular (Video Tutorial)
- Video Courses
- Chart Forum
- Before You Start: All Things Angular (Telerik Blog Post)
- Knowledge Base