private CanvasLabel RenderLabel(AxisGridLine axisGridLine, Rect viewExtent, Size controlSize)
        {
            var scaledPosition = _valueScaler.Scale(axisGridLine.Position, viewExtent.Left, viewExtent.Width, 0d, controlSize.Width);

            var canvasLine = new CanvasLabel()
            {
                Text = axisGridLine.LabelName,
                X    = scaledPosition,
                Y    = controlSize.Height - MarginHeight
            };

            return(canvasLine);
        }
Ejemplo n.º 2
0
        private CanvasLine RenderLine(AxisGridLine axisGridLine, Rect viewExtent, Size controlSize)
        {
            var scaledPosition = _valueScaler.Scale(axisGridLine.Position, viewExtent.Left, viewExtent.Width, 0d, controlSize.Width);

            var canvasLine = new CanvasLine()
            {
                X1 = scaledPosition,
                Y1 = 0,
                X2 = scaledPosition,
                Y2 = controlSize.Height - MarginHeight
            };

            return(canvasLine);
        }
        private CanvasLabel RenderLabel(AxisGridLine axisGridLine, Rect viewExtent, Size controlSize)
        {
            var scaledPosition = _valueScaler.Scale(axisGridLine.Position, viewExtent.Top, viewExtent.Height, 0d, controlSize.Height);

            var canvasLine = new CanvasLabel()
            {
                Text      = axisGridLine.LabelName,
                X         = MarginWidth,
                Y         = controlSize.Height - scaledPosition,
                IsRotated = true
            };

            return(canvasLine);
        }