Exemplo n.º 1
0
        void ChartTypeEventHandler(string type)
        {
            switch (type)
            {
            case "Pie":
                if (this.EnableThreeD)
                {
                    ChartType = new PieChart3D();
                }
                else
                {
                    ChartType = new PieChart();
                }
                break;

            case "Funnel":
                ChartType = new Funnel();
                break;

            case "Doughnut":
                if (this.EnableThreeD)
                {
                    ChartType = new Doughnut3D();
                }
                else
                {
                    ChartType = new Doughnut();
                }
                break;

            case "Pyramid":
                ChartType = new Pyramid();
                break;
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// Is raised when ThreeD mode  is activated or deactivated.
 /// </summary>
 /// <param name="CanEnable">if set to <c>true</c> [can enable].</param>
 void ThreeDEventHandler(bool CanEnable)
 {
     if (CanEnable)
     {
         if (ChartType.GetType().Name == "PieChart")
         {
             ChartType = new PieChart3D();
         }
         else if (ChartType.GetType().Name == "Doughnut")
         {
             ChartType = new Doughnut3D();
         }
         this.EnableThreeD = true;
     }
     else
     {
         if (ChartType.GetType().Name == "PieChart3D")
         {
             ChartType = new PieChart();
         }
         else if (ChartType.GetType().Name == "Doughnut3D")
         {
             ChartType = new Doughnut();
         }
         this.EnableThreeD = false;
     }
 }