White space above and below chart when dynamically setting height

Thread is closed for posting
2 posts, 0 answers
  1. Paul
    Paul avatar
    76 posts
    Member since:
    Feb 2008

    Posted 12 Sep 2011 Link to this post

    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">
              <telerik:ChartSeries Name="Series1" />
              <Appearance Dimensions-Margins-Top="0" Dimensions-Margins-Bottom="0" />
              <EmptySeriesMessage TextBlock-Text="No data available for this chart." />
              <XAxis DataLabelsColumn="ln_fi" />
         <Legend Visible="false" />

    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?


  2. Peshito
    Peshito avatar
    590 posts

    Posted 15 Sep 2011 Link to this post

    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,
    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
Back to Top