Ejemplo n.º 1
0
        /// <summary>
        /// <see cref="ChartItemCollection.CopyAndAdjustItemValue(ChartItem, CoordinateType)"/>
        /// </summary>
        public override ChartItem CopyAndAdjustItemValue(ChartItem item, CoordinateType coordinateType)
        {
            if (item == null)
            {
                return(item);
            }

            VolumnItem vItem = item as VolumnItem;

            return(new VolumnItem()
            {
                Value = coordinateType == CoordinateType.Log10 ? Math.Pow(10, vItem.Value) : vItem.Value,
                Turnover = vItem.Turnover,
                ExchangeRate = vItem.ExchangeRate,
                IsRaise = vItem.IsRaise,
                Date = item.Date,
                ExtraData = item.ExtraData
            });
        }
Ejemplo n.º 2
0
        /// <summary>
        /// <see cref="ChartItemCollection.ConvertFrom(QueryItem)"/>
        /// </summary>
        public override ChartItem ConvertFrom(QueryItem queryItem)
        {
            VolumnItem item = new VolumnItem()
            {
                Date = queryItem.Date
            };

            if (queryItem.Volumn != null)
            {
                item.Volumn = queryItem.Volumn.Value;
            }

            if (queryItem.Turnover != null)
            {
                item.Turnover = queryItem.Turnover.Value;
            }

            if (queryItem.ExchangeRate != null)
            {
                item.ExchangeRate = queryItem.ExchangeRate.Value;
            }
            return(item);
        }