ComponentOne Xamarin.iOS Documentation
Controls / Sunburst Chart / Features / Zooming and Panning
In This Topic
    Zooming and Panning
    In This Topic

    Zooming can be performed in Sunburst chart using ZoomBehavior class. To implement zooming, you need to create an object of ZoomBehavior class available in the C1.iOS.Chart.Interaction namespace and pass it as a parameter to the Add method. This method adds zoom behavior to the behavior collection by accessing it through Behaviors property of ChartBase class.

    The following code examples demonstrate how to implement zooming in C#. These examples use the sample created in the Quick Start section.

    C#
    Copy Code
    ZoomBehavior z = new ZoomBehavior();
    sunburst.Behaviors.Add(z);
    

    Similarly, panning can be implemented in Sunburst chart by creating an object of TranslateBehavior class available in the C1.iOS.Chart.Interaction namespace and passing it as a parameter to the Add method. This method adds translation behavior to the behavior collection by accessing it through Behaviors property of the ChartBase class.

    The following code examples demonstrate how to implement panning in C#. These examples use the sample created in the Quick Start section.

    C#
    Copy Code
    TranslateBehavior t = new TranslateBehavior();
    sunburst.Behaviors.Add(t);