RadChart Range

2 posts, 0 answers
  1. Rosendo Hernandez Gomez
    Rosendo Hernandez Gomez avatar
    4 posts
    Member since:
    Aug 2007

    Posted 24 May 2008 Link to this post

    Hi, I would like to know how can I set a range data on my Chart, I need it starts at value 2 on X and finish at 20 and starts at 13 on Y and finish at 31.
    No mather how many series I add they are in this range.
    So I read that doing this on codebehind the graph will automatically  do it so
    I tried  it  but I can´t figure out how to add X and Y Values, the function
    chartSeries.AddItem only allows me to put one Value but I nee to put both.

    Thank you
  2. Dwight
    Admin
    Dwight avatar
    475 posts

    Posted 26 May 2008 Link to this post

    Hi Rosendo,

    Thanks for writing. The AddItem method of the Series has different overloads, most of which create a ChartSeriesItem in the background for you. Since none of these works for your case, the best solution is to just create a ChartSeriesItem instance on your own, set it's appropriate values and add it to the series. The following code demonstrates this technique:
    this.radChart1.Series[0].AddItem(new ChartSeriesItem(10, 20)); 
    Note: Once you set the X value of even a single item, the RadChart will expect all chart items to have X values, which will lead to incorrect rendering of the items with no X value set.

    If you have further questions, just drop us a line.

    Regards,
    Evtim
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for WinForms is Visual Studio 2017 Ready
Back to Top