Dynamically Growing PlotArea

Thread is closed for posting
4 posts, 0 answers
  1. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 30 Nov 2010 Link to this post

    I have created a simple bar chart... which is bound to an array... size of array is unknown... is it possible for me to make a chart which have same bar widths even there are 2 record or more... current bars become thicker when there are less records.... 

    second thing is when I have lets' say 1000 bars in chart the PlotArea is too small for these number of bars... it creates a mess with scale and bars... i need a chart that have same same bar width for any number of charts and dynamic PlotArea...

    please help
  2. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 03 Dec 2010 Link to this post

    Hello Abdul,

    Even though you don't know the count of the bars you can use the maximal value of the chart Bars and set it as MaxValue of the XAxis. To be able to do this you should turn off the XAxis.AutoScale proeprty and provide your own values for MinValue, MaxValue and Step. This way, you will always have the same number of items along the X axis, so the bar will always be with the same width.
    Setting custom scale with appropriate Step will help you resolving your second issue too.

    All the best,
    Evgenia
    the Telerik team
    Browse the vast support resources we have to jumpstart 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
  4. Abdul
    Abdul avatar
    39 posts
    Member since:
    Oct 2010

    Posted 07 Dec 2010 Link to this post

    I have plotted my x-axis accordingly... and currently using zoom property to view my all millions of bars (plots) in reasonable size. I'am more concerned with my second question i.e. to draw a custom sized PlotArea. So the chart size become as much larger as the axis is..

    However i have received this reply on dynamically growing chart size question... some what related to this question

    "RadChart creates an image on the server and sends it to the client so there is no way on the client side to change that size. The solution is to use JavaScript and send requests to the server."

  5. Evgenia
    Admin
    Evgenia avatar
    1407 posts

    Posted 10 Dec 2010 Link to this post

    Hi Abdul,

    RadChart renders a normal image on the page, which does not have any dynamic values to resize itself. This how ever can be achieved with the help of some javascript for manually altering the image width/height. Take a look at the following Code Library - http://www.telerik.com/community/code-library/aspnet-ajax/chart/resize-chart-image-in-radsplitter.aspx   and more specifically the ClientSide resizing.

    Greetings,
    Evgenia
    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