how to find Line Chart Data items Active Region

Thread is closed for posting
2 posts, 0 answers
  1. kiran
    kiran avatar
    36 posts
    Member since:
    May 2008

    Posted 26 Jun 2008 Link to this post

    Hi Telerik Team,

    I am unable to find line chart data items active region points.(X,Y) values.
    i used the following code to find the active region.


    items = radChart1.Series[1].Items;
    for (int i = 0; i < items.Count; i++)

    Please help me out. i need these points X and Y values. Please share some sample application to get the active region points.

    Any help is highly appreciated.

  2. Dwight
    Dwight avatar
    475 posts

    Posted 30 Jun 2008 Link to this post

    Hi kiran,

    The items' ActiveRegion usually occupies a wider area than a single point. The easiest way to obtain a point is to retrieve the bounds of the region (which is a rectangular area) and get the center point:
    private List<Point> RetrieveSeriesPoints(ChartSeries series) 
        if (series == null
            return null
        List<Point> itemPoints = new List<Point>(); 
        foreach (ChartSeriesItem item in series.Items) 
            RectangleF regionBounds = item.ActiveRegion.Region.GetBounds(); 
            Point position = new Point((int)(regionBounds.Left + regionBounds.Width / 2), (int)(regionBounds.Top + regionBounds.Height / 2)); 
        return itemPoints; 

    All the best,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top