Completed
Last Updated: 03 Aug 2016 14:36 by ADMIN
ADMIN
Telerik Admin
Created on: 18 May 2015 14:39
Category: HtmlChart
Type: Feature Request
0
radhtmlchart
allow for the chart plot area to be fixed width not counting the axis text. the issue I have is the legend on right side of chart changes the widths of chart when the text is long.
Attached Files:
1 comment
ADMIN
Danail Vasilev
Posted on: 03 Aug 2016 14:36
You can fix this issue as follows:
1) Set enough margin between the plotarea and the legend - http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/appearance-and-styling/labels-and-titles-font-settings#setting-text-styles-for-titles-and-labels.
2) Use custom position for the legend - http://docs.telerik.com/devtools/aspnet-ajax/controls/htmlchart/appearance-and-styling/legend-settings#position-and-alignment.
ASPX:
	<form id="form1" runat="server">
		<telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
		<telerik:RadHtmlChart runat="server" ID="PieChart1" Transitions="true" Width="750px" Height="400px">
			<Legend>
				<Appearance Position="Custom" OffsetX="450" OffsetY="150"></Appearance>
			</Legend>
			<PlotArea>
				<Appearance>
					<TextStyle Margin="0 250 0 0" />
				</Appearance>
				<Series>
					<telerik:PieSeries StartAngle="90">
						<SeriesItems>
							<telerik:PieSeriesItem BackgroundColor="#9de219" Exploded="true" Name="Asia" Y="18.3" />
							<telerik:PieSeriesItem BackgroundColor="#90cc38" Exploded="false" Name="Europe" Y="35.8" />
							<telerik:PieSeriesItem BackgroundColor="#068c35" Exploded="false" Name="Latin America America Americaaaaaaaa" Y="38.3" />
						</SeriesItems>
					</telerik:PieSeries>
				</Series>
			</PlotArea>
		</telerik:RadHtmlChart>
		<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" Transitions="true" Width="750px" Height="400px">
			<Legend>
				<Appearance Position="Custom" OffsetX="450" OffsetY="150"></Appearance>
			</Legend>
			<PlotArea>
				<Appearance>
					<TextStyle Margin="0 250 0 0" />
				</Appearance>
				<Series>
					<telerik:PieSeries StartAngle="90">
						<SeriesItems>
							<telerik:PieSeriesItem BackgroundColor="#9de219" Exploded="true" Name="Asia" Y="18.3" />
							<telerik:PieSeriesItem BackgroundColor="#90cc38" Exploded="false" Name="Europe" Y="35.8" />
							<telerik:PieSeriesItem BackgroundColor="#068c35" Exploded="false" Name="Latin America" Y="38.3" />
						</SeriesItems>
					</telerik:PieSeries>
				</Series>
			</PlotArea>
		</telerik:RadHtmlChart>
	</form>