Completed
Last Updated: 15 Aug 2016 10:06 by ADMIN
ADMIN
Dimitar
Created on: 04 Apr 2016 10:28
Category: ChartView
Type: Bug Report
0
FIX. RadChartView - the second added donut series cannot be selected.
To reproduce: 
- Add two donut series and set their RadiusFactor so both series can be seen.
- Add ChartSelectionController.
- You will be able to select points from the firs series only. 

Workaround:
class MyPieRenderer : PieRenderer
{
    public MyPieRenderer(PieArea area) : base(area)
    {
    }

    public override DataPoint HitTest(int x, int y)
    {
        if (this.DrawParts.Count > 0)
        {
            foreach (var item in this.DrawParts)
            {
                if (item is PieSeriesDrawPart)
                {
                    Dictionary<PieDataPoint, GraphicsPath> paths = ((PieSeriesDrawPart)item).PointPaths;

                    foreach (PieDataPoint point in paths.Keys)
                    {
                        GraphicsPath path = new GraphicsPath();
                        paths.TryGetValue(point, out path);

                        if (path != null)
                        {
                            if (path.IsVisible(x, y))
                            {
                                return point;
                            }
                        }
                    }
                }
            }
        }
        return null;
    }
}
private void RadChartView1_CreateRenderer(object sender, ChartViewCreateRendererEventArgs e)
{
    e.Renderer = new MyPieRenderer((PieArea)e.Area);
}
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
0 comments