Completed
Last Updated: 17 Mar 2015 16:27 by ADMIN
ADMIN
Dess | Tech Support Engineer, Principal
Created on: 06 Mar 2015 09:37
Category: ChartView
Type: Bug Report
3
FIX. RadChartView - Clicking on the chart for the first time triggers the LassoZoomController logic and zooms the chart
Workaround:

public class CustomLassoZoomController : LassoZoomController
{
    protected override ActionResult OnMouseUp(MouseEventArgs e)
    {
        if (this.MouseDownLocation == Point.Empty || this.MouseMoveLocation == Point.Empty)
        {
            return Controller.Empty;
        }

        return base.OnMouseUp(e);
    }
}

public Form1()
{
    InitializeComponent();

    BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
    barSeries.Name = "Q1";
    barSeries.DataPoints.Add(new CategoricalDataPoint(177, "Harley"));
    barSeries.DataPoints.Add(new CategoricalDataPoint(128, "White"));
    barSeries.DataPoints.Add(new CategoricalDataPoint(143, "Smith"));
    barSeries.DataPoints.Add(new CategoricalDataPoint(111, "Jones"));
    barSeries.DataPoints.Add(new CategoricalDataPoint(118, "Marshall")); 
    this.radChartView1.Series.Add(barSeries);

    BarSeries barSeries2 = new BarSeries("Performance", "RepresentativeName");
    barSeries2.Name = "Q2";
    barSeries2.DataPoints.Add(new CategoricalDataPoint(153, "Harley"));
    barSeries2.DataPoints.Add(new CategoricalDataPoint(141, "White"));
    barSeries2.DataPoints.Add(new CategoricalDataPoint(130, "Smith"));
    barSeries2.DataPoints.Add(new CategoricalDataPoint(88, "Jones"));
    barSeries2.DataPoints.Add(new CategoricalDataPoint(109, "Marshall"));
    this.radChartView1.Series.Add(barSeries2);

    CustomLassoZoomController lassoZoomController = new CustomLassoZoomController();
    radChartView1.Controllers.Add(lassoZoomController);
}
0 comments