Exemplo n.º 1
0
        public WebAnalyticsSubPage()
        {
            this.InitializeComponent();
            InitializeChart();

            tChart1.Panel.Gradient.Visible = false;
            tChart2.Panel.Gradient.Visible = false;
            tChart3.Panel.Gradient.Visible = false;
            tChart4.Panel.Gradient.Visible = false;

            donut1.Clear();
            donut1.Add(750, Color.FromArgb(255, ((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163))))));
            donut1.Add(250, Colors.Transparent);

            donut2.Clear();
            donut2.Add(3390, Colors.Green);
            donut2.Add(2510, Colors.Transparent);

            donut3.Clear();
            donut3.Add(1500, Colors.Red);
            donut3.Add(500, Colors.Transparent);

            double[] vals1 = new double[] { 220, 150, 135, 190, 210, 200 };
            double[] vals2 = new double[] { 100, 70, 100, 150, 110, 24 };
            double[] vals3 = new double[] { 100, 130, 80, 130, 126, 240 };

            line1.Smoothed = true;
            line2.Smoothed = true;
            line3.Smoothed = true;
            line1.Add(vals1);
            line2.Add(vals2);
            line3.Add(vals3);
        }
        private void initChart()
        {
            donut1.Clear();
            donut1.Add(60, Color.FromArgb(255, 215, 215, 215));
            donut1.Add(40, Color.FromArgb(255, 249, 205, 32));

            donut2.Clear();
            donut2.Add(75, Color.FromArgb(255, 215, 215, 215));
            donut2.Add(25, Color.FromArgb(255, 243, 146, 37));

            donut3.Clear();
            donut3.Add(77, Color.FromArgb(255, 215, 215, 215));
            donut3.Add(23, Color.FromArgb(255, 249, 205, 32));

            donut4.Clear();
            donut4.Add(80, Color.FromArgb(255, 215, 215, 215));
            donut4.Add(20, Color.FromArgb(255, 243, 146, 37));

            horizBar1.Clear();
            horizBar1.Add(0.4, "Late at night in bed", Color.FromArgb(255, 249, 205, 32));
            horizBar1.Add(0.25, "While commuting", Color.FromArgb(255, 243, 146, 37));
            horizBar1.Add(0.23, "While having dinner", Color.FromArgb(255, 249, 205, 32));
            horizBar1.Add(0.20, "While shopping", Color.FromArgb(255, 243, 146, 37));
        }
        public DonutSubPage()
        {
            this.InitializeComponent();
            InitializeChart();

            tChart1.Panel.Gradient.Visible = false;
            tChart1.Legend.Transparent     = true;
            donut1.MarksPie.LegSize        = 24;
            donut1.Marks.Callout.Distance  = 10;

            donut1.Add(17098242, "Russia");
            donut1.Add(9984670, "Canada");
            donut1.Add(9572900, "China");
            donut1.Add(9526468, "United States");
            donut1.Add(8515767, "Brazil");
            donut1.Add(7692024, "Australia");
        }