说明:

  将鼠标移动到POINT上时,显示该点的值。

  其实就是在一条FASTLINE上再画一组点,二者重叠。

 

  private Steema.TeeChart.Styles.FastLine area1, area2;
        private Steema.TeeChart.Styles.Points points1, points2;
        private Steema.TeeChart.Tools.MarksTip tooltip1, tooltip2;


        private void Form1_Load(object sender, EventArgs e)
        {
            area1 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            points1 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
            area2 = new Steema.TeeChart.Styles.FastLine(tChart1.Chart);
            points2 = new Steema.TeeChart.Styles.Points(tChart1.Chart);
            tooltip1 = new Steema.TeeChart.Tools.MarksTip(tChart1.Chart);
            tooltip2 = new Steema.TeeChart.Tools.MarksTip(tChart1.Chart);
            //--------------------------------------------------------//
            tChart1.Aspect.View3D = false;
            area1.Add(1, 10);
            area1.Add(2, 15);
            area1.Add(3, 20);
            area1.Add(4, 25);
            area1.Add(5, 30);
            area2.FillSampleValues();
            points1.DataSource = area1;
            points2.DataSource = area2;
            points1.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Diamond;
            points2.Pointer.Style = Steema.TeeChart.Styles.PointerStyles.Diamond;
            tooltip1.Series = points1;
            points1.Color = area1.Color;
            points1.Pointer.Pen.Color = area1.LinePen.Color;
            tooltip2.Series = points2;
            //---------------------------------------------------------------//
            points2.Color = area2.Color;
            points2.Pointer.Pen.Color = area2.LinePen.Color;
            tooltip1.MouseDelay = 50;
            tooltip1.MouseAction = Steema.TeeChart.Tools.MarksTipMouseAction.Move;
            tooltip1.Style = Steema.TeeChart.Styles.MarksStyles.XY;
            tooltip2.MouseAction = Steema.TeeChart.Tools.MarksTipMouseAction.Move;
            tooltip2.Style = Steema.TeeChart.Styles.MarksStyles.Value;
            //-------------Style Legend-----------------------------------------//
            points1.ShowInLegend = false;
            points2.ShowInLegend = false;
            tChart1.Legend.LegendStyle = Steema.TeeChart.LegendStyles.Values;
            //-------------------------------------------------------------------//

        }