public ChartGrid()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            bar1.Add(32, "John");
            bar1.Add(417, "Anne");
            bar1.Add(65, "Louise");
            bar1.Add(87, "Jeff");
            dataGrid1.DataBindings.Clear();

            dataGrid1.SetDataBinding(bar1.DataSource, "TeeDataTable");
        }
        public Bar_SelfStack()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            bar1.Add(100, "Cars");
            bar1.Add(300, "Phones");
            bar1.Add(200, "Lamps");

            // Set "Self-Stacked":
            bar1.MultiBar = Steema.TeeChart.Styles.MultiBars.SelfStack;

            // cosmetic
            bar1.Marks.Visible = false;
            bar1.Marks.Style   = Steema.TeeChart.Styles.MarksStyles.Value;
            bar1.ColorEach     = true;
            this.checkBox1_CheckedChanged(this, new System.EventArgs());
        }
Пример #3
0
        public Marks_Multi()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            barSeries1.Add(123, "Hello\n World");
            barSeries1.Marks.Style     = TeeChart.Styles.MarksStyles.LabelValue;
            barSeries1.Marks.MultiLine = true;
        }
        public Tools_ColorBand()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            // alternative method to add points
            barSeries1.Add(new double[5] {
                30, 150, 75, 280, 600
            });
        }
Пример #5
0
 public void fillGraphs()
 {
     Steema.TeeChart.TChart     tChart1 = new Steema.TeeChart.TChart(this);
     Steema.TeeChart.Styles.Bar bar1    = new Steema.TeeChart.Styles.Bar();
     tChart1.Series.Add(bar1);
     bar1.Add(68, "Montag", Color.Red);
     bar1.Add(46, "Dienstag", Color.Blue);
     bar1.Add(98, "Mittwoch", Color.Green);
     bar1.Add(66, "Donnerstag", Color.Blue);
     bar1.Add(20, "Freitag", Color.Green);
     bar1.Add(70, "Samstag", Color.Blue);
     bar1.Add(0, "Sonntag", Color.Green);
     Steema.TeeChart.Themes.BlackIsBackTheme theme = new Steema.TeeChart.Themes.BlackIsBackTheme(tChart1.Chart);
     theme.Apply();
     SetContentView(tChart1);
 }
Пример #6
0
        public Series_SortLabels()
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();

            barSeries1.Add(323, "John");
            barSeries1.Add(222, "Anne");
            barSeries1.Add(456, "Matt");
            barSeries1.Add(188, "Sean");
            barSeries1.Add(701, "Andrew");
            barSeries1.Add(411, "Marc");

            label3.Text = "";
        }
Пример #7
0
 private void button1_Click(object sender, EventArgs e)
 {
     mystyle++;
     tChart1.Series.Clear();
     switch (mystyle)
     {
         case 1:
             Steema.TeeChart.Styles.Area area = new Steema.TeeChart.Styles.Area();
             area.Add(data);
             tChart1.Series.Add(area);
             break;
         case 2:
             Steema.TeeChart.Styles.Arrow arrow= new Steema.TeeChart.Styles.Arrow();
             arrow.Add(data);
             tChart1.Series.Add(arrow);
             break;
         case 3:
             Steema.TeeChart.Styles.Bar Bar = new Steema.TeeChart.Styles.Bar();
             Bar.Add(data);
             tChart1.Series.Add(Bar);
             break;
         case 4:
             Steema.TeeChart.Styles.Bar3D Bar3D = new Steema.TeeChart.Styles.Bar3D();
             Bar3D.Add(data);
             tChart1.Series.Add(Bar3D);
             break;
         case 5:
             Steema.TeeChart.Styles.BarJoin BarJoin = new Steema.TeeChart.Styles.BarJoin();
             BarJoin.Add(data);
             tChart1.Series.Add(BarJoin);
             break;
         case 6:
             Steema.TeeChart.Styles.Bezier Bezier = new Steema.TeeChart.Styles.Bezier();
             Bezier.Add(data);
             tChart1.Series.Add(Bezier);
             break;
     }
     if (mystyle > 10)
         mystyle = 0;
 }
Пример #8
0
        private void tchartdisplay_2groups(string title, float[,] data, string[] ttt, int count)
        {
            int i;
            Color c;
            tChart1.Visible = true;
            label3.Visible = false;
            tChart1.Series.Clear();
            tChart1.Header.Text = title;
            tChart1.Legend.FontSeriesColor = true;
            tChart1.Legend.Visible = false;

            switch (comboBox5.SelectedIndex)
            {
                case 0:
                    Steema.TeeChart.Styles.Bar bar = new Steema.TeeChart.Styles.Bar();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        bar.Add(data[i,0], ttt[i]+"����", c);
                    }

                    Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        bar1.Add(data[i, 1], ttt[i] +"������", c);
                    }
                    tChart1.Series.Add(bar);
                    tChart1.Series.Add(bar1);
                    break;
                case 1:
                    Steema.TeeChart.Styles.Pie pie = new Steema.TeeChart.Styles.Pie();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pie.Add(data[i,0], ttt[i]+"����", c);
                    }
                    Steema.TeeChart.Styles.Pie pie1 = new Steema.TeeChart.Styles.Pie();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pie1.Add(data[i, 1], ttt[i] + "������", c);
                    }
                    tChart1.Series.Add(pie);
                    tChart1.Series.Add(pie1);
                    break;
                case 2:
                    Steema.TeeChart.Styles.Pyramid pi = new Steema.TeeChart.Styles.Pyramid();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pi.Add(data[i,0], ttt[i]+"����", c);
                    }
                    Steema.TeeChart.Styles.Pyramid pi1 = new Steema.TeeChart.Styles.Pyramid();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        pi1.Add(data[i, 1], ttt[i]+"������", c);
                    }
                    tChart1.Series.Add(pi);
                    tChart1.Series.Add(pi1);
                    break;
                case 3:
                    Steema.TeeChart.Styles.Donut dt = new Steema.TeeChart.Styles.Donut();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        dt.Add(data[i,0], ttt[i]+"����", c);
                    }
                    Steema.TeeChart.Styles.Donut dt1 = new Steema.TeeChart.Styles.Donut();
                    for (i = 0; i < count; i++)
                    {
                        c = Color.FromArgb(global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256), global.r.Next(0, 256));
                        dt1.Add(data[i, 1], ttt[i]+"������", c);
                    }
                    tChart1.Series.Add(dt);
                    tChart1.Series.Add(dt1);
                    break;
            }
        }
Пример #9
0
        public MultiPies()
        {
            this.tChart6 = new Steema.TeeChart.Chart();
            this.bar3    = new Steema.TeeChart.Styles.Bar();
            this.tChart5 = new Steema.TeeChart.Chart();
            this.bar2    = new Steema.TeeChart.Styles.Bar();
            this.tChart4 = new Steema.TeeChart.Chart();
            this.tChart3 = new Steema.TeeChart.Chart();
            this.pie3    = new Steema.TeeChart.Styles.Pie();
            this.tChart2 = new Steema.TeeChart.Chart();
            this.pie2    = new Steema.TeeChart.Styles.Pie();
            this.tChart1 = new Steema.TeeChart.Chart();
            this.pie1    = new Steema.TeeChart.Styles.Pie();
            this.tChart7 = new Steema.TeeChart.Chart();
            this.bar4    = new Steema.TeeChart.Styles.Bar();
            this.bar5    = new Steema.TeeChart.Styles.Bar();
            this.label1  = new Label();
            this.bar1    = new Steema.TeeChart.Styles.Bar();
            // tChart6
            this.tChart6.Aspect.Elevation                  = 315;
            this.tChart6.Aspect.ElevationFloat             = 315D;
            this.tChart6.Aspect.Orthogonal                 = false;
            this.tChart6.Aspect.Perspective                = 0;
            this.tChart6.Aspect.Rotation                   = 360;
            this.tChart6.Aspect.RotationFloat              = 360D;
            this.tChart6.Aspect.View3D                     = false;
            this.tChart6.Axes.Bottom.Visible               = false;
            this.tChart6.Axes.Left.AxisPen.Color           = Color.FromRgb(((int)(((byte)(192)))), ((int)(((byte)(191)))), ((int)(((byte)(191)))));
            this.tChart6.Axes.Left.AxisPen.Width           = 1;
            this.tChart6.Axes.Left.Grid.Visible            = false;
            this.tChart6.Axes.Left.Increment               = 20D;
            this.tChart6.Axes.Left.Labels.Font.Brush.Color = Color.FromRgb(((int)(((byte)(128)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
            this.tChart6.Axes.Left.MinorTicks.Visible      = false;
            this.tChart6.Footer.Font.Brush.Color           = Color.Gray;
            this.tChart6.Header.Font.Brush.Color           = Color.Gray;
            this.tChart6.Header.Lines                  = new string[] { "Evening Class" };
            this.tChart6.Header.Visible                = false;
            this.tChart6.Legend.Visible                = false;
            this.tChart6.Panel.Brush.Color             = Color.White;
            this.tChart6.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart6.Panel.MarginBottom            = 6D;
            this.tChart6.Series.Add(this.bar3);
            this.tChart6.Walls.Back.Brush.Gradient.EndColor = Color.White;
            this.tChart6.Walls.Visible = false;
            // bar3
            this.bar3.BarRound             = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.bar3.Brush.Color          = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar3.Color                = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar3.ColorEach            = true;
            this.bar3.Marks.Arrow.Visible  = false;
            this.bar3.Marks.ArrowLength    = -24;
            this.bar3.Marks.Pen.Visible    = false;
            this.bar3.Marks.Shadow.Visible = false;
            this.bar3.Marks.Style          = Steema.TeeChart.Styles.MarksStyles.Value;
            this.bar3.Pen.Color            = Color.FromRgb(((int)(((byte)(41)))), ((int)(((byte)(61)))), ((int)(((byte)(98)))));
            this.bar3.Title                = "bar1";
            this.bar3.XValues.DataMember   = "X";
            this.bar3.XValues.Order        = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.bar3.YValues.DataMember   = "Bar";
            // tChart5
            this.tChart5.Aspect.Elevation                  = 315;
            this.tChart5.Aspect.ElevationFloat             = 315D;
            this.tChart5.Aspect.Orthogonal                 = false;
            this.tChart5.Aspect.Perspective                = 0;
            this.tChart5.Aspect.Rotation                   = 360;
            this.tChart5.Aspect.RotationFloat              = 360D;
            this.tChart5.Aspect.View3D                     = false;
            this.tChart5.Axes.Bottom.Visible               = false;
            this.tChart5.Axes.Left.AxisPen.Color           = Color.FromRgb(((int)(((byte)(192)))), ((int)(((byte)(191)))), ((int)(((byte)(191)))));
            this.tChart5.Axes.Left.AxisPen.Width           = 1;
            this.tChart5.Axes.Left.Grid.Visible            = false;
            this.tChart5.Axes.Left.Increment               = 20D;
            this.tChart5.Axes.Left.Labels.Font.Brush.Color = Color.FromRgb(((int)(((byte)(128)))), ((int)(((byte)(127)))), ((int)(((byte)(127)))));
            this.tChart5.Axes.Left.MinorTicks.Visible      = false;
            this.tChart5.Footer.Font.Brush.Color           = Color.Gray;
            this.tChart5.Header.Font.Brush.Color           = Color.Gray;
            this.tChart5.Header.Lines                  = new string[] { "Afternoon Class" };
            this.tChart5.Header.Visible                = false;
            this.tChart5.Legend.Visible                = false;
            this.tChart5.Panel.Brush.Color             = Color.White;
            this.tChart5.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart5.Panel.MarginBottom            = 6D;
            this.tChart5.Series.Add(this.bar2);
            this.tChart5.Walls.Back.Brush.Gradient.EndColor = Color.White;
            this.tChart5.Walls.Visible = false;
            // bar2
            this.bar2.BarRound             = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.bar2.Brush.Color          = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar2.Color                = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar2.ColorEach            = true;
            this.bar2.Marks.Arrow.Visible  = false;
            this.bar2.Marks.ArrowLength    = -24;
            this.bar2.Marks.Pen.Visible    = false;
            this.bar2.Marks.Shadow.Visible = false;
            this.bar2.Marks.Style          = Steema.TeeChart.Styles.MarksStyles.Value;
            this.bar2.Pen.Color            = Color.FromRgb(((int)(((byte)(41)))), ((int)(((byte)(61)))), ((int)(((byte)(98)))));
            this.bar2.Title                = "bar1";
            this.bar2.XValues.DataMember   = "X";
            this.bar2.XValues.Order        = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.bar2.YValues.DataMember   = "Bar";
            // tChart4
            this.tChart4.Aspect.Elevation                  = 315;
            this.tChart4.Aspect.ElevationFloat             = 315D;
            this.tChart4.Aspect.Orthogonal                 = false;
            this.tChart4.Aspect.Perspective                = 0;
            this.tChart4.Aspect.Rotation                   = 360;
            this.tChart4.Aspect.RotationFloat              = 360D;
            this.tChart4.Aspect.View3D                     = false;
            this.tChart4.Axes.Bottom.Visible               = false;
            this.tChart4.Axes.Left.AxisPen.Width           = 1;
            this.tChart4.Axes.Left.Grid.Visible            = false;
            this.tChart4.Axes.Left.Increment               = 20D;
            this.tChart4.Axes.Left.Labels.Font.Brush.Color = Color.Gray;
            this.tChart4.Axes.Left.MinorTicks.Visible      = false;
            this.tChart4.Footer.Font.Brush.Color           = Color.Gray;
            this.tChart4.Header.Font.Brush.Color           = Color.Gray;
            this.tChart4.Header.Lines                  = new string[] { "Morning Class" };
            this.tChart4.Header.Visible                = false;
            this.tChart4.Legend.Visible                = false;
            this.tChart4.Panel.Brush.Color             = Color.White;
            this.tChart4.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart4.Panel.MarginBottom            = 6D;
            this.tChart4.Series.Add(this.bar1);
            this.tChart4.Walls.Back.Brush.Gradient.EndColor = Color.White;
            this.tChart4.Walls.Visible = false;
            // tChart3
            this.tChart3.Aspect.Elevation              = 315;
            this.tChart3.Aspect.ElevationFloat         = 315D;
            this.tChart3.Aspect.Orthogonal             = false;
            this.tChart3.Aspect.Perspective            = 0;
            this.tChart3.Aspect.Rotation               = 360;
            this.tChart3.Aspect.RotationFloat          = 360D;
            this.tChart3.Aspect.View3D                 = false;
            this.tChart3.Footer.Font.Brush.Color       = Color.Blue;
            this.tChart3.Header.Font.Brush.Color       = Color.Gray;
            this.tChart3.Header.Lines                  = new string[] { "Evening Class" };
            this.tChart3.Legend.Visible                = false;
            this.tChart3.Panel.Brush.Color             = Color.White;
            this.tChart3.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart3.Series.Add(this.pie3);
            this.tChart3.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // pie3
            this.pie3.Brush.Color    = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.pie3.Circled        = true;
            this.pie3.Color          = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.pie3.ExplodeBiggest = 5;
            this.pie3.ExplodedSlice.Add(0);
            this.pie3.ExplodedSlice.Add(5);
            this.pie3.Frame.Circled = true;
            this.pie3.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.pie3.Frame.OuterBand.Gradient.UseMiddle = false;
            this.pie3.LabelMember         = "Labels";
            this.pie3.Marks.Visible       = false;
            this.pie3.MarksPie.LegSize    = 0;
            this.pie3.MarksPie.VertCenter = false;
            this.pie3.MultiPie            = Steema.TeeChart.Styles.MultiPies.Automatic;
            this.pie3.OtherSlice.Style    = Steema.TeeChart.Styles.PieOtherStyles.None;
            this.pie3.OtherSlice.Text     = "";
            this.pie3.OtherSlice.Value    = 0D;
            this.pie3.RotationAngle       = 91;
            pie3.FillSampleValues(2);
            this.pie3.Title = "pie1";
            this.pie3.UniqueCustomRadius = true;
            this.pie3.XValues.DataMember = "Angle";
            this.pie3.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.pie3.YValues.DataMember = "Pie";
            // tChart2
            this.tChart2.Aspect.Elevation              = 315;
            this.tChart2.Aspect.ElevationFloat         = 315D;
            this.tChart2.Aspect.Orthogonal             = false;
            this.tChart2.Aspect.Perspective            = 0;
            this.tChart2.Aspect.Rotation               = 360;
            this.tChart2.Aspect.RotationFloat          = 360D;
            this.tChart2.Aspect.View3D                 = false;
            this.tChart2.Footer.Font.Brush.Color       = Color.Blue;
            this.tChart2.Header.Font.Brush.Color       = Color.Gray;
            this.tChart2.Header.Lines                  = new string[] { "Afternoon Class" };
            this.tChart2.Legend.Visible                = false;
            this.tChart2.Panel.Brush.Color             = Color.White;
            this.tChart2.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart2.Series.Add(this.pie2);
            this.tChart2.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // pie2
            this.pie2.Brush.Color    = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.pie2.Circled        = true;
            this.pie2.Color          = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.pie2.ExplodeBiggest = 5;
            this.pie2.ExplodedSlice.Add(5);
            this.pie2.Frame.Circled = true;
            this.pie2.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.pie2.Frame.OuterBand.Gradient.UseMiddle = false;
            this.pie2.LabelMember         = "Labels";
            this.pie2.Marks.Visible       = false;
            this.pie2.MarksPie.LegSize    = 0;
            this.pie2.MarksPie.VertCenter = false;
            this.pie2.MultiPie            = Steema.TeeChart.Styles.MultiPies.Automatic;
            this.pie2.OtherSlice.Style    = Steema.TeeChart.Styles.PieOtherStyles.None;
            this.pie2.OtherSlice.Text     = "";
            this.pie2.OtherSlice.Value    = 0D;
            this.pie2.RotationAngle       = 91;
            pie2.FillSampleValues(2);
            this.pie2.Title = "pie1";
            this.pie2.UniqueCustomRadius = true;
            this.pie2.XValues.DataMember = "Angle";
            this.pie2.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.pie2.YValues.DataMember = "Pie";
            // tChart1
            this.tChart1.Aspect.Elevation              = 315;
            this.tChart1.Aspect.ElevationFloat         = 315D;
            this.tChart1.Aspect.Orthogonal             = false;
            this.tChart1.Aspect.Perspective            = 0;
            this.tChart1.Aspect.Rotation               = 360;
            this.tChart1.Aspect.RotationFloat          = 360D;
            this.tChart1.Aspect.View3D                 = false;
            this.tChart1.Footer.Font.Brush.Color       = Color.Blue;
            this.tChart1.Header.Font.Brush.Color       = Color.Gray;
            this.tChart1.Header.Lines                  = new string[] { "Morning Class" };
            this.tChart1.Legend.Visible                = false;
            this.tChart1.Panel.Brush.Color             = Color.White;
            this.tChart1.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart1.Series.Add(this.pie1);
            this.tChart1.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // pie1
            this.pie1.Brush.Color    = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.pie1.Circled        = true;
            this.pie1.Color          = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.pie1.ExplodeBiggest = 5;
            this.pie1.ExplodedSlice.Add(5);
            this.pie1.Frame.Circled = true;
            this.pie1.Frame.FrameElementPercents = new double[] {
                25D,
                60D,
                15D
            };
            this.pie1.Frame.OuterBand.Gradient.UseMiddle = false;
            this.pie1.LabelMember         = "Labels";
            this.pie1.Marks.Visible       = false;
            this.pie1.MarksPie.LegSize    = 0;
            this.pie1.MarksPie.VertCenter = false;
            this.pie1.MultiPie            = Steema.TeeChart.Styles.MultiPies.Automatic;
            this.pie1.OtherSlice.Style    = Steema.TeeChart.Styles.PieOtherStyles.None;
            this.pie1.OtherSlice.Text     = "";
            this.pie1.OtherSlice.Value    = 0D;
            this.pie1.RotationAngle       = 91;
            pie1.FillSampleValues(2);
            this.pie1.Title = "pie1";
            this.pie1.UniqueCustomRadius = true;
            this.pie1.XValues.DataMember = "Angle";
            this.pie1.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.pie1.YValues.DataMember = "Pie";
            // tChart7
            this.tChart7.Footer.Font.Brush.Color       = Color.Blue;
            this.tChart7.Header.Visible                = false;
            this.tChart7.Legend.Alignment              = Steema.TeeChart.LegendAlignments.Top;
            this.tChart7.Legend.Font.Brush.Color       = Color.Gray;
            this.tChart7.Legend.Font.Name              = "Segoe UI";
            this.tChart7.Legend.Font.Size              = 14;
            this.tChart7.Legend.Pen.Visible            = false;
            this.tChart7.Legend.Transparent            = true;
            this.tChart7.Panel.Bevel.Outer             = Steema.TeeChart.Drawing.BevelStyles.None;
            this.tChart7.Panel.Brush.Color             = Color.White;
            this.tChart7.Panel.Brush.Gradient.EndColor = Color.White;
            this.tChart7.Panel.MarginBottom            = 0D;
            this.tChart7.Panel.MarginTop               = 6D;
            this.tChart7.Series.Add(this.bar4);
            this.tChart7.Series.Add(this.bar5);
            this.tChart7.Walls.Back.Brush.Gradient.EndColor = Color.White;
            // bar4
            this.bar4.BarRound           = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.bar4.Brush.Color        = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar4.Color              = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar4.ColorEach          = false;
            this.bar4.Marks.Visible      = false;
            this.bar4.Pen.Color          = Color.FromRgb(((int)(((byte)(41)))), ((int)(((byte)(61)))), ((int)(((byte)(98)))));
            this.bar4.Pen.Visible        = false;
            this.bar4.Title              = "Women";
            this.bar4.XValues.DataMember = "X";
            this.bar4.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.bar4.YValues.DataMember = "Bar";
            // bar5
            this.bar5.BarRound           = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.bar5.Brush.Color        = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.bar5.Color              = Color.FromRgb(((int)(((byte)(243)))), ((int)(((byte)(156)))), ((int)(((byte)(53)))));
            this.bar5.ColorEach          = false;
            this.bar5.Marks.Visible      = false;
            this.bar5.Pen.Color          = Color.FromRgb(((int)(((byte)(146)))), ((int)(((byte)(94)))), ((int)(((byte)(32)))));
            this.bar5.Pen.Visible        = false;
            this.bar5.Title              = "Men";
            this.bar5.XValues.DataMember = "X";
            this.bar5.XValues.Order      = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.bar5.YValues.DataMember = "Bar";
            // label1
            this.label1.Text = "Women are more likely to attend the day classes while men are more commonly found" +
                               " in the evening class";
            // bar1
            this.bar1.BarRound             = Steema.TeeChart.Styles.BarRounding.AtValue;
            this.bar1.Brush.Color          = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar1.Color                = Color.FromRgb(((int)(((byte)(68)))), ((int)(((byte)(102)))), ((int)(((byte)(163)))));
            this.bar1.ColorEach            = true;
            this.bar1.Marks.Arrow.Visible  = false;
            this.bar1.Marks.ArrowLength    = -24;
            this.bar1.Marks.Pen.Visible    = false;
            this.bar1.Marks.Shadow.Visible = false;
            this.bar1.Marks.Style          = Steema.TeeChart.Styles.MarksStyles.Value;
            this.bar1.Pen.Color            = Color.FromRgb(((int)(((byte)(41)))), ((int)(((byte)(61)))), ((int)(((byte)(98)))));
            this.bar1.Title                = "bar1";
            this.bar1.XValues.DataMember   = "X";
            this.bar1.XValues.Order        = Steema.TeeChart.Styles.ValueListOrder.Ascending;
            this.bar1.YValues.DataMember   = "Bar";

            bar1.Add(pie1.YValues[0]);
            bar1.Add(pie1.YValues[1]);
            bar2.Add(pie2.YValues[0]);
            bar2.Add(pie2.YValues[1]);
            bar3.Add(pie3.YValues[0]);
            bar3.Add(pie3.YValues[1]);

            tChart1.Panel.Gradient.Visible = false;
            tChart2.Panel.Gradient.Visible = false;
            tChart3.Panel.Gradient.Visible = false;
            tChart4.Panel.Gradient.Visible = false;
            tChart5.Panel.Gradient.Visible = false;
            tChart6.Panel.Gradient.Visible = false;
            tChart7.Panel.Gradient.Visible = false;

            tChart4[0].Marks.FontSeriesColor = true;
            tChart5[0].Marks.FontSeriesColor = true;
            tChart6[0].Marks.FontSeriesColor = true;

            chartView1 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView1.Model = tChart1;

            chartView2 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView2.Model = tChart2;

            chartView3 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView3.Model = tChart3;

            chartView4 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView4.Model = tChart4;

            chartView5 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView5.Model = tChart5;

            chartView6 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView6.Model = tChart6;

            chartView7 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
                WidthRequest      = 25,
                HeightRequest     = 25
            };
            chartView7.Model = tChart7;


            Grid grid = new Grid
            {
                VerticalOptions = LayoutOptions.FillAndExpand,
                Padding         = 5,
                RowDefinitions  =
                {
                    new RowDefinition {
                        Height = new GridLength(1, GridUnitType.Star)
                    },
                    new RowDefinition {
                        Height = new GridLength(1, GridUnitType.Star)
                    }
                },
                ColumnDefinitions =
                {
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    },
                    new ColumnDefinition {
                        Width = new GridLength(1, GridUnitType.Star)
                    }
                }
            };

            //grid.Children.Add(chartView7, 0, 3, 0, 1);
            grid.Children.Add(chartView1, 0, 0);
            grid.Children.Add(chartView2, 1, 0);
            grid.Children.Add(chartView3, 2, 0);
            grid.Children.Add(chartView4, 0, 1);
            grid.Children.Add(chartView5, 1, 1);
            grid.Children.Add(chartView6, 2, 1);

            // Build the page.
            this.Content = grid;
        }
Пример #10
0
        public Page1()
        {
            // NavigationPage.SetHasNavigationBar(this, false);

            dashBoard0 = new Chart();
            dashBoard0.Aspect.View3D = false;
            Steema.TeeChart.Styles.Bar  bar1  = new Steema.TeeChart.Styles.Bar();
            Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line();
            dashBoard0.Series.Add(bar1);
            dashBoard0.Series.Add(line1);
            //barline chart
            bar1.Clear();
            bar1.Add(20);
            bar1.Add(50);
            bar1.Add(10);
            bar1.Add(70);
            bar1.Add(46);
            bar1.Pen.Visible          = false;
            bar1.BarStyle             = Steema.TeeChart.Styles.BarStyles.RectGradient;
            bar1.Marks.Visible        = false;
            bar1.Gradient.StartColor  = Color.White;
            bar1.Gradient.EndColor    = Color.FromRgb(102, 205, 170);
            bar1.Marks.Visible        = true;
            bar1.Marks.Shadow.Visible = false;
            bar1.Marks.Color          = Color.White;
            bar1.Marks.Font.Size      = 10;
            bar1.Marks.Font.Color     = Color.FromRgb(102, 205, 170);
            bar1.Marks.Pen.Visible    = false;
            bar1.Marks.ArrowLength    = 5;
            bar1.Color = Color.White;

            line1.Clear();
            line1.Add(0, 45);
            line1.Add(0.444444444444444, 55);
            line1.Add(0.888888888888889, 75);
            line1.Add(1.33333333333333, 65);
            line1.Add(1.77777777777778, 45);
            line1.Add(2.22222222222222, 80);
            line1.Add(2.66666666666667, 85);
            line1.Add(3.11111111111111, 98);
            line1.Add(3.55555555555556, 75);
            line1.Add(4, 68);
            line1.Color = Color.FromRgb(255, 255, 240);

            line1.LinePen.Width = 3;
            line1.Smoothed      = true;

            dashBoard0.Panel.Color            = Color.FromRgb(102, 205, 170);
            dashBoard0.Panel.Gradient.Visible = false;
            dashBoard0.Walls.Back.Visible     = false;
            dashBoard0.Title.Text             = "Bars and Lines";
            dashBoard0.Title.Alignment        = TextAlignment.Start;
            dashBoard0.Title.Font.Size        = 12;
            dashBoard0.Title.Font.Color       = Color.White;
            //dashBoard0.Title.Font.Name = "";
            dashBoard0.Axes.Left.AxisPen.Visible     = false;
            dashBoard0.Axes.Bottom.AxisPen.Color     = Color.White;
            dashBoard0.Legend.Visible                = false;
            dashBoard0.Axes.Left.Grid.Color          = Color.White;
            dashBoard0.Axes.Left.Grid.Style          = Steema.TeeChart.Drawing.DashStyle.Dot;
            dashBoard0.Axes.Left.Labels.Font.Color   = Color.White;
            dashBoard0.Axes.Bottom.Labels.Font.Color = Color.White;
            dashBoard0.Axes.Left.Increment           = 25;

            DashView0 = new ChartView
            {
                VerticalOptions   = LayoutOptions.FillAndExpand,
                HorizontalOptions = LayoutOptions.FillAndExpand,
            };
            DashView0.Model = dashBoard0;

            Content = new StackLayout
            {
                Children =
                {
                    DashView0
                }
            };
        }
        /// <summary>
        /// Drawing first contingency table to chart
        /// </summary>
        /// <param name="hypothese">Hypothese to take contingency table from</param>
        /// <param name="chart">Chart to draw bars into</param>
        private void DrawBarsFromSecondTable(HypothesisStruct hypothese, Steema.TeeChart.TChart chart)
        {
            chart.Series.Clear();
            Random random = new Random();
            bool fft = false;

            this.ContingencyTableChart.Header.Text = this.resManager.GetString("SecondContingencyTable");

            //for miners with boolean antecedents and succedents - for now only 4ft
            foreach (BooleanLiteralStruct booleanLiteral in hypothese.booleanLiterals)
            {
                if ((booleanLiteral.cedentType == CedentEnum.Antecedent) || (booleanLiteral.cedentType == CedentEnum.Succedent))
                {
                    fft = true;
                    break;
                }
            }
               // int i = 0;
            int j = 0;

            int[][] transpondedTable = FerdaResultBrowserControl.Transpose(hypothese.quantifierSetting.secondContingencyTableRows);

            for (int k = transpondedTable.GetUpperBound(0); k >=0; k--)
            {
                Steema.TeeChart.Styles.Bar barSeries = new Steema.TeeChart.Styles.Bar();
                barSeries.Color = System.Drawing.Color.FromArgb(random.Next(255), random.Next(255), random.Next(255));
                barSeries.MultiBar = Steema.TeeChart.Styles.MultiBars.None;

                foreach (int number in transpondedTable[k])
                {
                    if ((fft) && (j == 0))
                    {
                        barSeries.Add(number, this.resManager.GetString("ColumnAntecedent"));
                    }
                    else
                    {
                        if ((fft) && (j == 1))
                        {
                            barSeries.Add(number, '\u00AC' + this.resManager.GetString("ColumnAntecedent"));
                        }
                        else
                        {
                            string seriesTitle = String.Empty;
                            foreach (LiteralStruct literal in hypothese.literals)
                            {
                                if (literal.cedentType == CedentEnum.Antecedent)
                                {
                                    if (literal.categoriesNames.Length > j)
                                    {
                                        seriesTitle = literal.categoriesNames[j];
                                    }
                                }
                            }
                            barSeries.Add(number, seriesTitle);
                        }
                    }
                    j++;
                }

                if (this.CheckBoxShowLabels.Checked)
                {
                    barSeries.Marks.Visible = true;
                }
                else
                {
                    barSeries.Marks.Visible = false;
                }
                barSeries.Marks.Style = Steema.TeeChart.Styles.MarksStyles.LabelValue;
                if (fft)
                {
                    if (k == 0)
                    {
                        barSeries.Title = this.resManager.GetString("ColumnSuccedent");
                    }
                    else
                    {
                        barSeries.Title = '\u00AC' + this.resManager.GetString("ColumnSuccedent");
                    }
                }
                else
                {
                    string seriesTitle = String.Empty;
                    foreach (LiteralStruct literal in hypothese.literals)
                    {
                        if (literal.cedentType == CedentEnum.Succedent)
                        {
                            if (literal.categoriesNames.Length > k)
                            {
                                seriesTitle = literal.categoriesNames[k];
                            }
                            break;
                        }
                    }
                    if (seriesTitle == String.Empty)
                    {
                        foreach (LiteralStruct literal in hypothese.literals)
                        {
                            if (literal.cedentType == CedentEnum.Antecedent)
                            {
                                if (literal.categoriesNames.Length > k)
                                {
                                    seriesTitle = literal.categoriesNames[k];
                                }
                            }
                        }
                    }

                    barSeries.Title = seriesTitle;
                }
                chart.Series.Add(barSeries);
             //   i++;
                j = 0;
            }
        }
Пример #12
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            // Creating the Chart component
            Chart = new TChart();
            // Setting the Chart bounds
            Chart.Frame = View.Frame;

            // 2D Chart
            Chart.Aspect.View3D = false;

            // Customizing the Axes grid appearance
            Chart.Axes.Bottom.Grid.Visible       = false;
            Chart.Axes.Bottom.MinorTicks.Visible = false;

            // Setting a custom left axis increment, and axis pen width, and other properties
            Chart.Axes.Left.Increment       = 12.5;
            Chart.Axes.Left.AxisPen.Width   = 1;
            Chart.Axes.Bottom.AxisPen.Width = 1;
            Chart.Axes.Left.MaximumOffset   = 12;
            Chart.Axes.Left.AxisPen.Visible = false;

            // Chaging the Legend, Panel and Walls appearance
            Chart.Legend.Transparent     = true;
            Chart.Legend.Alignment       = LegendAlignments.Bottom;
            Chart.Walls.Back.Visible     = false;
            Chart.Panel.Gradient.Visible = false;

            // Allow to Zoom and Pan over the Chart Series
            Chart.Panning.Active = true;
            Chart.Zoom.Active    = true;

            // Creating the Chart Series (Bar series in that case)
            Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(Chart.Chart);
            Steema.TeeChart.Styles.Bar bar2 = new Steema.TeeChart.Styles.Bar(Chart.Chart);

            // Customizing the Series Bar aspect
            // bar1.ColorEach = true;

            bar1.CustomBarWidth = 30;
            bar2.CustomBarWidth = 30;

            bar1.Color       = Color.FromArgb(255, 156, 73, 181);
            bar1.Pen.Visible = false;
            bar2.Color       = Color.FromArgb(255, 107, 38, 131);
            bar2.Pen.Visible = false;

            // Addign data to the Bar1 and Bar2 Series
            bar1.Add(12.5);
            bar1.Add(40);
            bar1.Add(15.5);
            bar1.Add(12.5);
            bar1.Add(6);

            bar2.Add(14.5);
            bar2.Add(37.5);
            bar2.Add(13.5);
            bar2.Add(14);
            bar2.Add(4);

            // Hiding Series Marks
            bar1.Marks.Visible = false;
            bar2.Marks.Visible = false;

            // Other way to customize the Bar Series
            // (Chart.Series[0] as Steema.TeeChart.Styles.Bar).Marks.Visible = true;

            /*
             * Here creating several Line Series
             * Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(Chart.Chart);
             * Steema.TeeChart.Styles.Line line2 = new Steema.TeeChart.Styles.Line(Chart.Chart);
             * Steema.TeeChart.Styles.Line line3 = new Steema.TeeChart.Styles.Line(Chart.Chart);
             * Steema.TeeChart.Styles.Line line4 = new Steema.TeeChart.Styles.Line(Chart.Chart);
             *
             * for (int i=0;i<Chart.Series.Count;i++)
             * {
             *  Chart.Series[i].FillSampleValues(4);  // Using random data
             *  (Chart.Series[i] as Steema.TeeChart.Styles.Line).LinePen.Width = 3;
             *  (Chart.Series[i] as Steema.TeeChart.Styles.Line).Pointer.Visible = true;
             *  (Chart.Series[i] as Steema.TeeChart.Styles.Line).Pointer.Pen.Visible = false;
             * }
             */

            // Left axis title mods
            Chart.Axes.Left.Title.Text    = "This is a title";
            Chart.Axes.Left.Title.Angle   = 90;
            Chart.Axes.Left.Title.Visible = true;

            // Right axis title mods
            Chart.Axes.Right.Title.Text  = "This is a title";
            Chart.Axes.Right.Title.Angle = 90;


            // Setting both vertical axes visible for the Bar Series if desired
            // (Chart.Series[0] as Steema.TeeChart.Styles.Bar).VertAxis = Steema.TeeChart.Styles.VerticalAxis.Both;


            // Finally adding the Chart View as SubView to the parent View
            View.AddSubview(Chart);
        }