Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Chart > RadChart Range

Not answered RadChart Range

Feed from this thread
  • Rosendo Hernandez Gomez avatar

    Posted on May 24, 2008 (permalink)

    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

    Reply

  • Dwight Dwight admin's avatar

    Posted on May 26, 2008 (permalink)

    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

    Reply

  • Say Hello to Telerik's PivotGrid for ASP.NET AJAX, Silverlight, WPF and WinForms. Now packed with OLAP support.

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > Chart > RadChart Range