Exemplo n.º 1
0
        public void AddMarksTip(TChart objChart)
        {
            MarksTip marksTip = new MarksTip();

            marksTip.Active = true;
            objChart.Tools.Add(marksTip);
        }
        private void InitializeChart()
        {
            tChart1.Aspect.View3D                  = false;
            tChart1.Legend.Visible                 = false;
            tChart1.Header.Font.Color              = Color.FromArgb(154, 154, 154);
            tChart1.Header.Text                    = "Euribor";
            tChart1.Panel.Bevel.Inner              = BevelStyles.None;
            tChart1.Panel.Bevel.Outer              = BevelStyles.None;
            tChart1.Panel.Color                    = Color.White;
            tChart1.Panel.Gradient.Visible         = false;
            tChart1.Axes.Left.AxisPen.Color        = Color.FromArgb(120, 60, 20);
            tChart1.Axes.Left.AxisPen.Width        = 4;
            tChart1.Axes.Left.MinorTicks.Visible   = false;
            tChart1.Axes.Left.Grid.Color           = Color.FromArgb(245, 225, 170);
            tChart1.Axes.Left.Grid.Style           = System.Drawing.Drawing2D.DashStyle.Solid;
            tChart1.Axes.Bottom.AxisPen.Color      = Color.FromArgb(120, 60, 20);
            tChart1.Axes.Bottom.Grid.Visible       = false;
            tChart1.Axes.Bottom.MinorTicks.Visible = false;
            tChart1.Axes.Bottom.AxisPen.Width      = 4;
            tChart1.Walls.Back.Pen.Visible         = false;
            tChart1.Walls.Back.Gradient.Visible    = false;
            tChart1.Walls.Back.Color               = Color.White;

            Steema.TeeChart.Styles.Line series1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
            series1.Color           = Color.FromArgb(128, 128, 128);
            series1.Pointer.Style   = PointerStyles.Circle;
            series1.Pointer.Visible = true;

            series1.Add(5.323, "08-Aug");
            series1.Add(5.384, "08-Sep");
            series1.Add(5.248, "08-Oct");
            series1.Add(4.350, "08-Nov");
            series1.Add(3.452, "08-Dec");
            series1.Add(2.622, "09-Jan");
            series1.Add(2.135, "09-Feb");

            Steema.TeeChart.Tools.SeriesRegionTool region = new Steema.TeeChart.Tools.SeriesRegionTool(tChart1.Chart);
            region.Color        = Color.FromArgb(225, 225, 255);
            region.Transparency = 50;
            region.Series       = series1;

            Steema.TeeChart.Tools.MarksTip markstip = new MarksTip(tChart1.Chart);
            markstip.Series = series1;
#if VS2005
            markstip.BackColor = Color.White;
#endif
            markstip.Style = MarksStyles.Value;


            Steema.TeeChart.Animations.Expand expand;
            tChart1.Animations.Add(expand = new Steema.TeeChart.Animations.Expand());
            expand.Target  = ChartClickedPartStyle.SeriesPointer;
            expand.Trigger = Steema.TeeChart.Animations.AnimationTrigger.MouseOver;
        }