Ejemplo n.º 1
0
        /// <summary>
        /// Updates the data.
        /// </summary>
        protected internal override void UpdateData()
        {
            if (this.ItemsSource == null)
            {
                return;
            }

            this.items.Clear();

            // Use the mapping to generate the points
            if (this.Mapping != null)
            {
                foreach (var item in this.ItemsSource)
                {
                    this.items.Add(this.Mapping(item));
                }

                return;
            }

            var filler = new ListFiller <HighLowItem>();

            filler.Add(this.DataFieldX, (p, v) => p.X         = Axis.ToDouble(v));
            filler.Add(this.DataFieldHigh, (p, v) => p.High   = Axis.ToDouble(v));
            filler.Add(this.DataFieldLow, (p, v) => p.Low     = Axis.ToDouble(v));
            filler.Add(this.DataFieldOpen, (p, v) => p.Open   = Axis.ToDouble(v));
            filler.Add(this.DataFieldClose, (p, v) => p.Close = Axis.ToDouble(v));
            filler.FillT(this.items, this.ItemsSource);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Updates the data.
        /// </summary>
        protected internal override void UpdateData()
        {
            if (this.ItemsSource != null)
            {
                this.Items.Clear();

                var filler = new ListFiller <TornadoBarItem>();
                filler.Add(this.MinimumField, (item, value) => item.Minimum = Convert.ToDouble(value));
                filler.Add(this.MaximumField, (item, value) => item.Maximum = Convert.ToDouble(value));
                filler.FillT(this.Items, this.ItemsSource);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Updates the data.
        /// </summary>
        protected internal override void UpdateData()
        {
            if (this.ItemsSource == null)
            {
                return;
            }

            this.slices.Clear();

            var filler = new ListFiller <PieSlice>();

            filler.Add(this.LabelField, (item, value) => item.Label           = Convert.ToString(value));
            filler.Add(this.ValueField, (item, value) => item.Value           = Convert.ToDouble(value));
            filler.Add(this.ColorField, (item, value) => item.Fill            = (OxyColor)value);
            filler.Add(this.IsExplodedField, (item, value) => item.IsExploded = (bool)value);
            filler.FillT(this.slices, this.ItemsSource);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Adds scatter points specified by a items source and data fields.
        /// </summary>
        /// <param name="target">The destination collection.</param>
        /// <param name="itemsSource">The items source.</param>
        /// <param name="dataFieldX">The data field x.</param>
        /// <param name="dataFieldY">The data field y.</param>
        /// <param name="dataFieldSize">The data field size.</param>
        /// <param name="dataFieldValue">The data field value.</param>
        /// <param name="dataFieldTag">The data field tag.</param>
        protected void AddScatterPoints(
            IList <T> target,
            IEnumerable itemsSource,
            string dataFieldX,
            string dataFieldY,
            string dataFieldSize,
            string dataFieldValue,
            string dataFieldTag)
        {
            var filler = new ListFiller <T>();

            filler.Add(dataFieldX, (item, value) => item.X         = Convert.ToDouble(value));
            filler.Add(dataFieldY, (item, value) => item.Y         = Convert.ToDouble(value));
            filler.Add(dataFieldSize, (item, value) => item.Size   = Convert.ToDouble(value));
            filler.Add(dataFieldValue, (item, value) => item.Value = Convert.ToDouble(value));
            filler.Add(dataFieldTag, (item, value) => item.Tag     = value);
            filler.FillT(target, itemsSource);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Updates the data.
        /// </summary>
        protected internal override void UpdateData()
        {
            if (this.ItemsSource != null)
            {
                this.Items.Clear();

                var filler = new ListFiller<IntervalBarItem>();
                filler.Add(this.MinimumField, (item, value) => item.Start = Convert.ToDouble(value));
                filler.Add(this.MaximumField, (item, value) => item.End = Convert.ToDouble(value));
                filler.FillT(this.Items, this.ItemsSource);
            }
        }
        /// <summary>
        /// Updates the data.
        /// </summary>
        protected internal override void UpdateData()
        {
            if (this.ItemsSource == null)
            {
                return;
            }

            this.items.Clear();

            // Use the mapping to generate the points
            if (this.Mapping != null)
            {
                foreach (var item in this.ItemsSource)
                {
                    this.items.Add(this.Mapping(item));
                }

                return;
            }

            var filler = new ListFiller<HighLowItem>();
            filler.Add(this.DataFieldX, (p, v) => p.X = this.ToDouble(v));
            filler.Add(this.DataFieldHigh, (p, v) => p.High = this.ToDouble(v));
            filler.Add(this.DataFieldLow, (p, v) => p.Low = this.ToDouble(v));
            filler.Add(this.DataFieldOpen, (p, v) => p.Open = this.ToDouble(v));
            filler.Add(this.DataFieldClose, (p, v) => p.Close = this.ToDouble(v));
            filler.FillT(this.items, this.ItemsSource);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Adds scatter points specified by a items source and data fields.
 /// </summary>
 /// <param name="dest">
 /// The destination collection.
 /// </param>
 /// <param name="itemsSource">
 /// The items source.
 /// </param>
 /// <param name="dataFieldX">
 /// The data field x.
 /// </param>
 /// <param name="dataFieldY">
 /// The data field y.
 /// </param>
 /// <param name="dataFieldSize">
 /// The data field size.
 /// </param>
 /// <param name="dataFieldValue">
 /// The data field value.
 /// </param>
 /// <param name="dataFieldTag">
 /// The data field tag.
 /// </param>
 protected void AddScatterPoints(
     IList<ScatterPoint> dest,
     IEnumerable itemsSource,
     string dataFieldX,
     string dataFieldY,
     string dataFieldSize,
     string dataFieldValue,
     string dataFieldTag)
 {
     var filler = new ListFiller<ScatterPoint>();
     filler.Add(dataFieldX, (item, value) => item.X = Convert.ToDouble(value));
     filler.Add(dataFieldY, (item, value) => item.Y = Convert.ToDouble(value));
     filler.Add(dataFieldSize, (item, value) => item.Size = Convert.ToDouble(value));
     filler.Add(dataFieldValue, (item, value) => item.Value = Convert.ToDouble(value));
     filler.Add(dataFieldTag, (item, value) => item.Tag = value);
     filler.FillT(dest, itemsSource);
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Updates the data.
        /// </summary>
        protected internal override void UpdateData()
        {
            if (this.ItemsSource == null)
            {
                return;
            }

            this.slices.Clear();

            var filler = new ListFiller<PieSlice>();
            filler.Add(this.LabelField, (item, value) => item.Label = Convert.ToString(value));
            filler.Add(this.ValueField, (item, value) => item.Value = Convert.ToDouble(value));
            filler.Add(this.ColorField, (item, value) => item.Fill = (OxyColor)value);
            filler.Add(this.IsExplodedField, (item, value) => item.IsExploded = (bool)value);
            filler.FillT(this.slices, this.ItemsSource);
        }