Completed
Last Updated: 14 Sep 2021 10:17 by ADMIN
Release Q1 2015
Sean
Created on: 25 Jul 2014 09:15
Category: HtmlChart
Type: Bug Report
0
Unit.Percentage not working for RadHtmlChart
I have a stacked bar RadHtmlChart that is created programmatically in the code behind.
When I create the chart, and set the width to Unit.Pixel(1500), it works fine, as shown in Working.png. However, when I change the value to Unit.Percentage(90), the chart is not rendered properly at all.

Any fixes/workarounds for this?

Seán


For the time being you must set percentage to the chart's wrapper. For example:
CSS:
	<style type="text/css">
		html, body, form {
			padding: 0;
			margin: 0;
			height: 100%;
			overflow: hidden;
		}

		.myChart {
			width: 100% !important;
			height: 100% !important;
		}
	</style>
ASPX:
		<div style="width: 30%; height: 40%; border: 1px solid green;">
			<telerik:RadHtmlChart runat="server" ID="RadHtmlChart1" CssClass="myChart" Width="600px" Height="400px">
				<PlotArea>
					<Series>
						<telerik:ColumnSeries Name="Product 1">
							<SeriesItems>
								<telerik:CategorySeriesItem Y="15000" />
								<telerik:CategorySeriesItem Y="23000" />
								<telerik:CategorySeriesItem Y="10000" />
							</SeriesItems>
						</telerik:ColumnSeries>
					</Series>
					<XAxis>
						<Items>
							<telerik:AxisItem LabelText="1" />
							<telerik:AxisItem LabelText="2" />
							<telerik:AxisItem LabelText="3" />
						</Items>
					</XAxis>
				</PlotArea>
				<ChartTitle Text="Product sales for 2011">
				</ChartTitle>
				<Legend>
					<Appearance Position="Bottom" />
				</Legend>
			</telerik:RadHtmlChart>
		</div>
Attached Files:
0 comments