/// <summary> /// Updates the data. /// </summary> protected internal override void UpdateData() { if (this.ItemsSource == null) { return; } this.slices.Clear(); var filler = new ListBuilder <PieSlice>(); filler.Add(this.LabelField, (string)null); filler.Add(this.ValueField, double.NaN); filler.Add(this.ColorField, OxyColors.Automatic); filler.Add(this.IsExplodedField, false); filler.FillT( this.slices, this.ItemsSource, args => new PieSlice((string)args[0], Convert.ToDouble(args[1])) { Fill = (OxyColor)args[2], IsExploded = (bool)args[3] }); }
/// <summary> /// Updates the <see cref="F:ItemsSourcePoints" /> from the <see cref="P:ItemsSource" /> and data fields. /// </summary> protected override void UpdateFromDataFields() { var filler = new ListBuilder <ScatterPoint>(); filler.Add(this.DataFieldX, double.NaN); filler.Add(this.DataFieldY, double.NaN); filler.Add(this.DataFieldSize, double.NaN); filler.Add(this.DataFieldValue, double.NaN); filler.Add(this.DataFieldTag, (object)null); filler.FillT(this.ItemsSourcePoints, this.ItemsSource, args => new ScatterPoint(Axes.Axis.ToDouble(args[0]), Axes.Axis.ToDouble(args[1]), Axes.Axis.ToDouble(args[2]), Axes.Axis.ToDouble(args[3]), args[4])); }
/// <summary> /// Updates the data. /// </summary> protected internal override void UpdateData() { if (this.ItemsSource != null) { this.Items.Clear(); var filler = new ListBuilder <TornadoBarItem>(); filler.Add(this.MinimumField, double.NaN); filler.Add(this.MaximumField, double.NaN); filler.FillT(this.Items, this.ItemsSource, args => new TornadoBarItem() { Minimum = Convert.ToDouble(args[0]), Maximum = Convert.ToDouble(args[1]) }); } }
/// <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 sequenceOfHighLowItems = this.ItemsSource as IEnumerable <HighLowItem>; if (sequenceOfHighLowItems != null) { this.items.AddRange(sequenceOfHighLowItems); return; } var filler = new ListBuilder <HighLowItem>(); filler.Add(this.DataFieldX, double.NaN); filler.Add(this.DataFieldHigh, double.NaN); filler.Add(this.DataFieldLow, double.NaN); filler.Add(this.DataFieldOpen, double.NaN); filler.Add(this.DataFieldClose, double.NaN); filler.FillT(this.items, this.ItemsSource, args => new HighLowItem(Axis.ToDouble(args[0]), Convert.ToDouble(args[1]), Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]))); }
/// <summary> /// Updates the data. /// </summary> protected internal override void UpdateData() { if (this.ItemsSource == null) { return; } this.slices.Clear(); var filler = new ListBuilder<PieSlice>(); filler.Add(this.LabelField, (string)null); filler.Add(this.ValueField, double.NaN); filler.Add(this.ColorField, OxyColors.Automatic); filler.Add(this.IsExplodedField, false); filler.FillT( this.slices, this.ItemsSource, args => new PieSlice((string)args[0], Convert.ToDouble(args[1])) { Fill = (OxyColor)args[2], IsExploded = (bool)args[3] }); }
/// <summary> /// Updates the data. /// </summary> protected internal override void UpdateData() { if (this.ItemsSource != null) { this.Items.Clear(); var filler = new ListBuilder<IntervalBarItem>(); filler.Add(this.MinimumField, double.NaN); filler.Add(this.MaximumField, double.NaN); filler.FillT(this.Items, this.ItemsSource, args => new IntervalBarItem() { Start = Convert.ToDouble(args[0]), End = Convert.ToDouble(args[1]) }); } }
/// <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 sequenceOfHighLowItems = this.ItemsSource as IEnumerable<HighLowItem>; if (sequenceOfHighLowItems != null) { this.items.AddRange(sequenceOfHighLowItems); return; } var filler = new ListBuilder<HighLowItem>(); filler.Add(this.DataFieldX, double.NaN); filler.Add(this.DataFieldHigh, double.NaN); filler.Add(this.DataFieldLow, double.NaN); filler.Add(this.DataFieldOpen, double.NaN); filler.Add(this.DataFieldClose, double.NaN); filler.FillT(this.items, this.ItemsSource, args => new HighLowItem(Axis.ToDouble(args[0]), Convert.ToDouble(args[1]), Convert.ToDouble(args[2]), Convert.ToDouble(args[3]), Convert.ToDouble(args[4]))); }