Esempio n. 1
0
        public PlottableHSpan PlotHSpan(
            double x1,
            double x2,
            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 PlottableHSpan()
            {
                position1     = x1,
                position2     = x2,
                color         = color ?? settings.GetNextColor(),
                alpha         = alpha,
                label         = label,
                DragEnabled   = draggable,
                DragFixedSize = dragFixedSize
            };

            axisSpan.SetLimits(dragLimitLower, dragLimitUpper, null, null);

            Add(axisSpan);
            return(axisSpan);
        }
Esempio n. 2
0
        public PlottableHSpan PlotHSpan(
            double x1,
            double x2,
            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 PlottableHSpan(
                position1: x1,
                position2: x2,
                color: (Color)color,
                alpha: alpha,
                label: label,
                draggable: draggable,
                dragLimitLower: dragLimitLower,
                dragLimitUpper: dragLimitUpper
                );

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