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">
         <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
  2. Peshito
    Admin
    Peshito avatar
    497 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,
    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top