示例#1
0
        public PlottableVSpan PlotVSpan(
            double y1,
            double y2,
            Color?color           = null,
            double alpha          = .5,
            string label          = null,
            bool draggable        = false,
            bool dragFixedSize    = false,
            double dragLimitLower = double.NegativeInfinity,
            double dragLimitUpper = double.PositiveInfinity
            )
        {
            var axisSpan = new PlottableVSpan()
            {
                position1     = y1,
                position2     = y2,
                color         = color ?? settings.GetNextColor(),
                alpha         = alpha,
                label         = label,
                DragEnabled   = draggable,
                DragFixedSize = dragFixedSize,
            };

            axisSpan.SetLimits(null, null, dragLimitLower, dragLimitUpper);
            Add(axisSpan);
            return(axisSpan);
        }
示例#2
0
        public PlottableVSpan PlotVSpan(
            double y1,
            double y2,
            Color?color           = null,
            double alpha          = .5,
            string label          = null,
            bool draggable        = false,
            double dragLimitLower = double.NegativeInfinity,
            double dragLimitUpper = double.PositiveInfinity
            )
        {
            if (color == null)
            {
                color = settings.GetNextColor();
            }

            var axisSpan = new PlottableVSpan(
                position1: y1,
                position2: y2,
                color: (Color)color,
                alpha: alpha,
                label: label,
                draggable: draggable,
                dragLimitLower: dragLimitLower,
                dragLimitUpper: dragLimitUpper
                );

            settings.plottables.Add(axisSpan);
            return(axisSpan);
        }