/// <summary>
        /// Is initialized is called the first time a BarGraphPlotStyle.PrepareStyle was called.
        /// The BarGraphPlotStyle has stored two properties relGap and relBound, which are transferred
        /// to the group style in this process.
        /// </summary>
        /// <param name="barShiftStrategy">Strategy how to shift the bars belonging to one group.</param>
        /// <param name="barShiftMaxNumberOfItemsInOneDirection">If barShiftStrategy is set to a manual value, this parameter designates the maximum number of items in one direction. Ignored if bar shift strategy is set to automatic.</param>
        /// <param name="relInnerGapX">Gap x between to bars in a group in units of one bar width.</param>
        /// <param name="relOuterGapX">Gap x between the items of two groups in units of one bar width.</param>
        /// <param name="relInnerGapY">Gap y between to bars in a group in units of one bar width.</param>
        /// <param name="relOuterGapY">Gap y between the items of two groups in units of one bar width.</param>
        public void Initialize(BarShiftStrategy3D barShiftStrategy, int barShiftMaxNumberOfItemsInOneDirection, double relInnerGapX, double relOuterGapX, double relInnerGapY, double relOuterGapY)
        {
            if (barShiftMaxNumberOfItemsInOneDirection <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(barShiftMaxNumberOfItemsInOneDirection), "value should be >= 1");
            }

            _isInitialized    = true;
            _barShiftStrategy = barShiftStrategy;
            _barShiftMaxNumberOfItemsInOneDirection = barShiftMaxNumberOfItemsInOneDirection;
            _relInnerGapX = relInnerGapX;
            _relOuterGapX = relOuterGapX;
            _relInnerGapY = relInnerGapY;
            _relOuterGapY = relOuterGapY;
        }
        public void Apply(
            out BarShiftStrategy3D barShiftStrategy, out int barShiftMaxNumberOfItemsInOneDirection,
            out double relInnerGapX, out double relOuterGapX, out double sizeX, out double posX,
            out double relInnerGapY, out double relOuterGapY, out double sizeY, out double posY)
        {
            barShiftStrategy = _barShiftStrategy;
            barShiftMaxNumberOfItemsInOneDirection = _barShiftMaxNumberOfItemsInOneDirection;
            relInnerGapX = _relInnerGapX;
            relOuterGapX = _relOuterGapX;
            sizeX        = _logicalItemSizeX;
            posX         = _logicalItemOffsetX;

            relInnerGapY = _relInnerGapY;
            relOuterGapY = _relOuterGapY;
            sizeY        = _logicalItemSizeY;
            posY         = _logicalItemOffsetY;
        }
        public void TransferFrom(IPlotGroupStyle fromb)
        {
            var from = (BarSizePosition3DGroupStyle)fromb;

            _barShiftStrategy = from._barShiftStrategy;
            _barShiftMaxNumberOfItemsInOneDirection = from._barShiftMaxNumberOfItemsInOneDirection;
            _relInnerGapX = from._relInnerGapX;
            _relOuterGapX = from._relOuterGapX;
            _relInnerGapY = from._relInnerGapY;
            _relOuterGapY = from._relOuterGapY;

            _logicalClusterSizeX = from._logicalClusterSizeX;
            _logicalClusterSizeY = from._logicalClusterSizeY;
            _logicalItemSizeX    = from._logicalItemSizeX;
            _logicalItemOffsetX  = from._logicalItemOffsetX;
            _logicalItemSizeY    = from._logicalItemSizeY;
            _logicalItemOffsetY  = from._logicalItemOffsetY;
        }
        private void CopyFrom(BarSizePosition3DGroupStyle from)
        {
            if (object.ReferenceEquals(this, from))
            {
                return;
            }

            _isStepEnabled = from._isStepEnabled;

            _barShiftStrategy = from._barShiftStrategy;
            _barShiftMaxNumberOfItemsInOneDirection = from._barShiftMaxNumberOfItemsInOneDirection;
            _relInnerGapX = from._relInnerGapX;
            _relOuterGapX = from._relOuterGapX;
            _relInnerGapY = from._relInnerGapY;
            _relOuterGapY = from._relOuterGapY;

            _logicalClusterSizeX = from._logicalClusterSizeX;
            _logicalClusterSizeY = from._logicalClusterSizeY;
            _logicalItemSizeX    = from._logicalItemSizeX;
            _logicalItemOffsetX  = from._logicalItemOffsetX;
            _logicalItemSizeY    = from._logicalItemSizeY;
            _logicalItemOffsetY  = from._logicalItemOffsetY;
        }
Example #5
0
        public virtual bool CopyFrom(object obj, bool copyWithDataReferences)
        {
            if (object.ReferenceEquals(this, obj))
            {
                return(true);
            }

            var from = obj as BarGraphPlotStyle;

            if (null != from)
            {
                _usePhysicalBaseValue = from._usePhysicalBaseValue;
                _baseValue            = from._baseValue;
                _startAtPreviousItem  = from._startAtPreviousItem;
                _previousItemZGap     = from._previousItemZGap;

                _independentColor = from._independentColor;
                _pen = from._pen;
                _useUniformCrossSectionThickness = from._useUniformCrossSectionThickness;

                _barShiftStrategy = from._barShiftStrategy;
                _barShiftMaxNumberOfItemsInOneDirection = from._barShiftMaxNumberOfItemsInOneDirection;
                _relInnerGapX = from._relInnerGapX;
                _relOuterGapX = from._relOuterGapX;
                _relInnerGapY = from._relInnerGapY;
                _relOuterGapY = from._relOuterGapY;

                _xSizeLogical   = from._xSizeLogical;
                _xOffsetLogical = from._xOffsetLogical;
                _ySizeLogical   = from._ySizeLogical;
                _yOffsetLogical = from._yOffsetLogical;

                EhSelfChanged();
                return(true);
            }
            return(false);
        }
Example #6
0
		public virtual bool CopyFrom(object obj, bool copyWithDataReferences)
		{
			if (object.ReferenceEquals(this, obj))
				return true;

			var from = obj as BarGraphPlotStyle;
			if (null != from)
			{
				this._usePhysicalBaseValue = from._usePhysicalBaseValue;
				this._baseValue = from._baseValue;
				this._startAtPreviousItem = from._startAtPreviousItem;
				this._previousItemZGap = from._previousItemZGap;

				this._independentColor = from._independentColor;
				this._pen = from._pen;
				this._useUniformCrossSectionThickness = from._useUniformCrossSectionThickness;

				this._barShiftStrategy = from._barShiftStrategy;
				this._barShiftMaxNumberOfItemsInOneDirection = from._barShiftMaxNumberOfItemsInOneDirection;
				this._relInnerGapX = from._relInnerGapX;
				this._relOuterGapX = from._relOuterGapX;
				this._relInnerGapY = from._relInnerGapY;
				this._relOuterGapY = from._relOuterGapY;

				this._xSizeLogical = from._xSizeLogical;
				this._xOffsetLogical = from._xOffsetLogical;
				this._ySizeLogical = from._ySizeLogical;
				this._yOffsetLogical = from._yOffsetLogical;

				EhSelfChanged();
				return true;
			}
			return false;
		}
		public void Apply(
			out BarShiftStrategy3D barShiftStrategy, out int barShiftMaxNumberOfItemsInOneDirection,
			out double relInnerGapX, out double relOuterGapX, out double sizeX, out double posX,
			out double relInnerGapY, out double relOuterGapY, out double sizeY, out double posY)
		{
			barShiftStrategy = _barShiftStrategy;
			barShiftMaxNumberOfItemsInOneDirection = _barShiftMaxNumberOfItemsInOneDirection;
			relInnerGapX = _relInnerGapX;
			relOuterGapX = _relOuterGapX;
			sizeX = _logicalItemSizeX;
			posX = _logicalItemOffsetX;

			relInnerGapY = _relInnerGapY;
			relOuterGapY = _relOuterGapY;
			sizeY = _logicalItemSizeY;
			posY = _logicalItemOffsetY;
		}
		/// <summary>
		/// Is initialized is called the first time a BarGraphPlotStyle.PrepareStyle was called.
		/// The BarGraphPlotStyle has stored two properties relGap and relBound, which are transferred
		/// to the group style in this process.
		/// </summary>
		/// <param name="barShiftStrategy">Strategy how to shift the bars belonging to one group.</param>
		/// <param name="barShiftMaxNumberOfItemsInOneDirection">If barShiftStrategy is set to a manual value, this parameter designates the maximum number of items in one direction. Ignored if bar shift strategy is set to automatic.</param>
		/// <param name="relInnerGapX">Gap x between to bars in a group in units of one bar width.</param>
		/// <param name="relOuterGapX">Gap x between the items of two groups in units of one bar width.</param>
		/// <param name="relInnerGapY">Gap y between to bars in a group in units of one bar width.</param>
		/// <param name="relOuterGapY">Gap y between the items of two groups in units of one bar width.</param>
		public void Initialize(BarShiftStrategy3D barShiftStrategy, int barShiftMaxNumberOfItemsInOneDirection, double relInnerGapX, double relOuterGapX, double relInnerGapY, double relOuterGapY)
		{
			if (barShiftMaxNumberOfItemsInOneDirection <= 0)
				throw new ArgumentOutOfRangeException(nameof(barShiftMaxNumberOfItemsInOneDirection), "value should be >= 1");

			_isInitialized = true;
			_barShiftStrategy = barShiftStrategy;
			_barShiftMaxNumberOfItemsInOneDirection = barShiftMaxNumberOfItemsInOneDirection;
			_relInnerGapX = relInnerGapX;
			_relOuterGapX = relOuterGapX;
			_relInnerGapY = relInnerGapY;
			_relOuterGapY = relOuterGapY;
		}
		public void TransferFrom(IPlotGroupStyle fromb)
		{
			var from = (BarSizePosition3DGroupStyle)fromb;

			_barShiftStrategy = from._barShiftStrategy;
			_barShiftMaxNumberOfItemsInOneDirection = from._barShiftMaxNumberOfItemsInOneDirection;
			_relInnerGapX = from._relInnerGapX;
			_relOuterGapX = from._relOuterGapX;
			_relInnerGapY = from._relInnerGapY;
			_relOuterGapY = from._relOuterGapY;

			_logicalClusterSizeX = from._logicalClusterSizeX;
			_logicalClusterSizeY = from._logicalClusterSizeY;
			_logicalItemSizeX = from._logicalItemSizeX;
			_logicalItemOffsetX = from._logicalItemOffsetX;
			_logicalItemSizeY = from._logicalItemSizeY;
			_logicalItemOffsetY = from._logicalItemOffsetY;
		}
		private void CopyFrom(BarSizePosition3DGroupStyle from)
		{
			if (object.ReferenceEquals(this, from))
				return;

			_isStepEnabled = from._isStepEnabled;

			_barShiftStrategy = from._barShiftStrategy;
			_barShiftMaxNumberOfItemsInOneDirection = from._barShiftMaxNumberOfItemsInOneDirection;
			_relInnerGapX = from._relInnerGapX;
			_relOuterGapX = from._relOuterGapX;
			_relInnerGapY = from._relInnerGapY;
			_relOuterGapY = from._relOuterGapY;

			_logicalClusterSizeX = from._logicalClusterSizeX;
			_logicalClusterSizeY = from._logicalClusterSizeY;
			_logicalItemSizeX = from._logicalItemSizeX;
			_logicalItemOffsetX = from._logicalItemOffsetX;
			_logicalItemSizeY = from._logicalItemSizeY;
			_logicalItemOffsetY = from._logicalItemOffsetY;
		}