Skip to content

Latest commit

 

History

History
76 lines (65 loc) · 2.18 KB

kb-chartview-add-chart-title.md

File metadata and controls

76 lines (65 loc) · 2.18 KB
title page_title description type slug position tags ticketid res_type
How to Add Chart Title to RadChartView
Add Header to RadCartesianChart
Add a caption on top of RadCartesianChart using a TextBlock.
how-to
kb-chartview-add-chart-title
0
title,header,chartview
1425857
kb

Environment

Product Version 2019.2.618
Product RadChartView for WPF

Description

How to add a title to RadCartesianChart.

Solution

To add a title, add the chart and a TextBlock in a Grid panel with two RowDefinitions.

[XAML]

{{region kb-chartview-add-chart-title-0}} <Grid.RowDefinitions> </Grid.RowDefinitions>

	<TextBlock Text="Chart Title" HorizontalAlignment="Center"/>

	<telerik:RadCartesianChart Grid.Row="1">
		<telerik:RadCartesianChart.VerticalAxis>
			<telerik:LinearAxis/>
		</telerik:RadCartesianChart.VerticalAxis>
		<telerik:RadCartesianChart.HorizontalAxis>
			<telerik:CategoricalAxis />
		</telerik:RadCartesianChart.HorizontalAxis>		
		<telerik:RadCartesianChart.Grid>
            <telerik:CartesianChartGrid MajorLinesVisibility="Y" />
        </telerik:RadCartesianChart.Grid>
		<telerik:RadCartesianChart.Series>
			<telerik:BarSeries> 
				<telerik:BarSeries.DataPoints> 
					<telerik:CategoricalDataPoint Category="January" Value="2" /> 
					<telerik:CategoricalDataPoint Category="February" Value="5" /> 
					<telerik:CategoricalDataPoint Category="March" Value="3" /> 
					<telerik:CategoricalDataPoint Category="April" Value="10" /> 
					<telerik:CategoricalDataPoint Category="May" Value="9" /> 
					<telerik:CategoricalDataPoint Category="June" Value="7" /> 
					<telerik:CategoricalDataPoint Category="July" Value="1" /> 
				</telerik:BarSeries.DataPoints> 
			</telerik:BarSeries> 
		</telerik:RadCartesianChart.Series>
	</telerik:RadCartesianChart>
</Grid>

{{endregion}}

{{ site.framework_name }} RadChartView Add Chart Title

See Also

  • [Getting Started RadChartView]({%slug radchartview-introduction%})