Exemplo n.º 1
0
        public virtual void AppendCore(ICollection <TReal> x, ICollection <TReal> y, ICollection <TReal> w, ICollection <TReal> h, ICollection <object> atts)
        {
            this.y.AddRange(y);
            this.w.AddRange(w);
            this.h.AddRange(h);
            this.attributeValues.AddRange(atts);
            this.x.AddRange(x);

            var min = Math.Min(x.Min(), XRange.Min);
            var max = Math.Max(x.Zip(w, (a, b) => a + b).Max(), XRange.Max);

            xRange = new VisibleRange(min, max);

            min    = Math.Min(y.Min(), YRange.Min);
            max    = Math.Max(y.Zip(h, (a, b) => a + b).Max(), YRange.Max);
            yRange = new VisibleRange(min, max);
        }
Exemplo n.º 2
0
        public Series1(IReadOnlyList <TReal> xValues, IReadOnlyList <TReal> yValues, IReadOnlyList <TReal> widthValues, IReadOnlyList <TReal> heightValues)
        {
            RequiresNotNull(xValues, yValues, heightValues, widthValues);
            Requires(xValues.Count == yValues.Count);
            Requires(xValues.Count == heightValues.Count);
            Requires(xValues.Count == widthValues.Count);

            XValues      = xValues;
            YValues      = yValues;
            HeightValues = heightValues;
            WidthValues  = widthValues;

            if (xValues.Count > 0)
            {
                XRange = new VisibleRange(xValues.Min(), xValues.Max());
                YRange = new VisibleRange(yValues.Min(), yValues.Max());
            }
            else
            {
                XRange = new VisibleRange(0, 0);
                YRange = new VisibleRange(0, 0);
            }
        }
Exemplo n.º 3
0
		public Series1(IReadOnlyList<TReal> xValues, IReadOnlyList<TReal> yValues, IReadOnlyList<TReal> widthValues, IReadOnlyList<TReal> heightValues)
		{
			RequiresNotNull(xValues, yValues, heightValues, widthValues);
			Requires(xValues.Count == yValues.Count);
			Requires(xValues.Count == heightValues.Count);
			Requires(xValues.Count == widthValues.Count);

			XValues = xValues;
			YValues = yValues;
			HeightValues = heightValues;
			WidthValues = widthValues;

			if (xValues.Count > 0)
			{
				XRange = new VisibleRange(xValues.Min(), xValues.Max());
				YRange = new VisibleRange(yValues.Min(), yValues.Max());
			}
			else
			{
				XRange = new VisibleRange(0, 0);
				YRange = new VisibleRange(0, 0);
			}
		}