Beispiel #1
0
        protected override IEnumerable <double> GetXValues()
        {
            DataRect visible = DataSource2dContext.GetVisibleRect(this);

            yield return(visible.XMin);

            yield return(visible.XMax);
        }
        protected override IEnumerable <double> GetXValues()
        {
            var visible = DataSource2dContext.GetVisibleRect(this);
            var screen  = DataSource2dContext.GetScreenRect(this);

            int count = (int)Math.Ceiling(screen.Width) + 1;

            if (count == 0)
            {
                yield break;
            }
            else
            {
                double delta = visible.Width / count;
                double x     = (int)(visible.XMin / delta - 1) * delta;
                for (int i = 0; i < count; i++)
                {
                    yield return(x + i * delta);
                }
            }
        }