This is a migrated thread and some comments may be shown as answers.

White space above and below chart when dynamically setting height

1 Answer 81 Views
Chart (Obsolete)
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 12 Sep 2011, 02:50 PM
I'm dynamically setting the height of a chart based on the number of rows I have in my data. This is working fine with the exception of a large area of white space above and below the bar chart.

Here is my chart:
<telerik:RadChart ID="MetricsRadChart" runat="server" AutoLayout="true" SeriesOrientation="Horizontal" Skin="GrayStripes" Width="922px">
     <Series>
          <telerik:ChartSeries Name="Series1" />
     </Series>
     <PlotArea>
          <Appearance Dimensions-Margins-Top="0" Dimensions-Margins-Bottom="0" />
          <EmptySeriesMessage TextBlock-Text="No data available for this chart." />
          <XAxis DataLabelsColumn="ln_fi" />
     </PlotArea>
     <Legend Visible="false" />
</telerik:RadChart>

This is the line of code setting the height:
MetricsRadChart.Appearance.Dimensions.Height = Telerik.Charting.Styles.Unit.Pixel(data.Rows.Count * 25);

How can I remove the extra space between the title & chart and all the white space below it?

Thanks!

Paul

1 Answer, 1 is accepted

Sort by
0
Peshito
Telerik team
answered on 15 Sep 2011, 11:40 AM
Hello Paul,

I wasn't able to reproduce your issue. I am attaching a sample where you can see how I've implemented your scenario. In order to further assist you in solving your issue, could you send us a runnable copy of your project or simply edit and reproduce it to the one I've attached.

All the best,
Peshito
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
Tags
Chart (Obsolete)
Asked by
Paul
Top achievements
Rank 1
Answers by
Peshito
Telerik team
Share this question
or