Exemplo n.º 1
0
        /// <summary>
        /// 绘制Y轴标签
        /// </summary>
        private void DrawYLabels()
        {
            //绘制Y轴标签,纵轴,卫星号
            int minYDiffer = 10;
            int prevYPixe  = -minYDiffer;

            for (int i = 1; i <= SatCount; i++)
            {
                int y = GetYCoord(i - 1);//扣除epoch,从1开始

                int x   = Origin.X / 2;
                var pos = new Point(x, y);;
                if (y - prevYPixe >= minYDiffer)
                {
                    UserChartGraphics.DrawLabel(DataTable.Columns[i].ToString(), pos);

                    prevYPixe = y;
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// 绘制X轴标签
        /// </summary>
        private void DrawXLables()
        {
            //绘制历元标签
            int prevX      = -50;
            int minXDiffer = 20;

            for (int epcoh = MinEpoch; epcoh < MaxEpoch; epcoh++)
            {
                int y   = Origin.Y / 2;
                int x   = GetXCoord(epcoh);
                var pos = new Point(x, y);
                if ((pos.X - prevX) >= minXDiffer)
                {
                    prevX = pos.X;

                    var xlabel = GetIndexLabelX(epcoh);

                    UserChartGraphics.DrawLabel(xlabel, pos, -90);
                }
            }
        }