/// <summary> /// Sets the default values. /// </summary> /// <param name="model">The model.</param> protected internal override void SetDefaultValues(PlotModel model) { if (this.MaximumFillColor.IsAutomatic()) { this.defaultMaximumFillColor = model.GetDefaultColor(); } if (this.MinimumFillColor.IsAutomatic()) { this.defaultMinimumFillColor = model.GetDefaultColor(); } }
protected override void SetDefaultValues(PlotModel model) { if (this.Color.IsAutomatic()) { this.defaultColor = model.GetDefaultColor(); } }
/// <summary> /// Sets the default values. /// </summary> /// <param name="model"> /// The model. /// </param> protected internal override void SetDefaultValues(PlotModel model) { if (this.FillColor == null) { this.defaultFillColor = model.GetDefaultColor(); } }
/// <summary> /// Sets the default values. /// </summary> /// <param name="model">The model.</param> protected internal override void SetDefaultValues(PlotModel model) { if (this.Color.IsAutomatic()) { this.LineStyle = model.GetDefaultLineStyle(); this.defaultColor = model.GetDefaultColor(); } }
/// <summary> /// The set default values. /// </summary> /// <param name="model"> /// The model. /// </param> protected internal override void SetDefaultValues(PlotModel model) { if (this.Color2 == null) { this.LineStyle2 = model.GetDefaultLineStyle(); this.defaultColor2 = model.GetDefaultColor(); } }
/// <summary> /// Sets the default values. /// </summary> /// <param name="model">The model.</param> protected internal override void SetDefaultValues(PlotModel model) { foreach (var slice in this.Slices) { if (slice.Fill.IsAutomatic()) { slice.DefaultFillColor = model.GetDefaultColor(); } } }
/// <summary> /// Sets the default values. /// </summary> /// <param name="model">The model.</param> protected internal override void SetDefaultValues(PlotModel model) { base.SetDefaultValues(model); if (this.Color2.IsAutomatic()) { this.defaultColor2 = model.GetDefaultColor(); } if (this.LineStyle2 == LineStyle.Automatic) { this.LineStyle2 = model.GetDefaultLineStyle(); } }
/// <summary> /// Sets default values from the plot model. /// </summary> /// <param name="model">The plot model.</param> protected internal override void SetDefaultValues(PlotModel model) { if (this.LineStyle == LineStyle.Automatic) { this.defaultLineStyle = model.GetDefaultLineStyle(); } if (this.Color.IsAutomatic()) { this.defaultColor = model.GetDefaultColor(); if (this.MarkerFill.IsAutomatic()) { this.defaultMarkerFill = this.defaultColor; } } }
/// <summary> /// The set default values. /// </summary> /// <param name="model"> /// The model. /// </param> protected internal override void SetDefaultValues(PlotModel model) { // todo: should use ActualLineStyle if (this.Color == null) { if (this.LineStyle == LineStyle.Undefined) { this.LineStyle = model.GetDefaultLineStyle(); } this.defaultColor = model.GetDefaultColor(); // And MarkerFill will be overridden if not set to null if (this.MarkerFill == null) { this.MarkerFill = this.defaultColor; } } }
/// <summary> /// Sets the default values. /// </summary> /// <param name="model">The model.</param> protected internal override void SetDefaultValues(PlotModel model) { base.SetDefaultValues(model); if (this.ColorLo.IsAutomatic()) { this.defaultColorLo = model.GetDefaultColor(); } if (this.LineStyleLo == LineStyle.Automatic) { this.LineStyleLo = model.GetDefaultLineStyle(); } if (this.ColorHi.IsAutomatic()) { this.defaultColorHi = model.GetDefaultColor(); } if (this.LineStyleHi == LineStyle.Automatic) { this.LineStyleHi = model.GetDefaultLineStyle(); } }
public PlotModel DrawOxyPlotGraph(int a) { flag = a; Model = new PlotModel { LegendTitle = "Графики", LegendOrientation = LegendOrientation.Horizontal, LegendPlacement = LegendPlacement.Outside, LegendPosition = LegendPosition.TopRight, LegendTextColor = OxyColors.White, LegendTitleColor = OxyColors.White, PlotAreaBorderColor = OxyColors.White, SubtitleColor = OxyColors.White, SelectionColor = OxyColors.White, TextColor = OxyColors.White, TitleColor = OxyColors.White }; if (Model.Axes.Count > 0) { Model.Axes.Clear(); } Model.GetDefaultColor(); if (RangeOfDrawingSecond == -1) { Model = SettingDrawDefaultPosition(Model); } else if (RangeOfDrawingSecond == -2) { try { Model = SettingDrawSavePosition(Model); } catch (NullReferenceException) { Model = SettingDrawDefaultPosition(Model); } } else { Model = SettingDrawLastSeconds(Model); } Model.Series.Clear(); for (int i = 0; i < 2; i++) { var lineSerie = new LineSeries() { StrokeThickness = 3, MarkerSize = 3, MarkerStrokeThickness = 1, MarkerStroke = OxyColors.White, MarkerFill = OxyColors.White, MarkerType = BufferDataGraph.MarkerType, CanTrackerInterpolatePoints = false, Title = string.Format("Detector {0}", i), Smooth = false, }; if (flag == 1) { if (i == 0) { lineSerie.Color = OxyColors.Yellow; lineSerie.Title = "Момент (кН*м)"; int j = 0; foreach (var item in BufferDataGraph.PointFirstGraph1) { lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.DateFirstGraph1[j]), item)); j++; } } if (i == 1) { lineSerie.Color = OxyColors.Green; lineSerie.Title = "Позиция (обор.)"; int j = 0; foreach (var item in BufferDataGraph.PointTwoGraph1) { lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.DateTwoGraph1[j]), item)); j++; } } } if (flag == 2) { if (i == 0) { lineSerie.Color = OxyColors.Yellow; lineSerie.Title = "Момент (кН*м)"; int j = 0; foreach (var item in BufferDataGraph.PointFirstGraph1) { lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.TimeFirstGraph[j]), item)); j++; } } if (i == 1) { lineSerie.Color = OxyColors.Green; lineSerie.Title = "Позиция (обор.)"; int j = 0; foreach (var item in BufferDataGraph.PointTwoGraph1) { lineSerie.Points.Add(new DataPoint(DateTimeAxis.ToDouble(BufferDataGraph.TimeSecondGraph[j]), item)); j++; } } } Model.Series.Add(lineSerie); } return(Model); }
/// <summary> /// The set default values. /// </summary> /// <param name="model"> /// The model. /// </param> protected internal override void SetDefaultValues(PlotModel model) { if (this.MaximumFillColor == null) { this.defaultMaximumFillColor = model.GetDefaultColor(); } if (this.MinimumFillColor == null) { this.defaultMinimumFillColor = model.GetDefaultColor(); } }
/// <summary> /// Sets default values from the plot model. /// </summary> /// <param name="model">The plot model.</param> protected internal override void SetDefaultValues(PlotModel model) { if (this.Color.IsAutomatic()) { this.LineStyle = model.GetDefaultLineStyle(); this.defaultColor = model.GetDefaultColor(); } }
/// <summary> /// Sets the default values. /// </summary> /// <param name="model">The model.</param> protected internal override void SetDefaultValues(PlotModel model) { if (this.FillColor.IsAutomatic()) { this.defaultFillColor = model.GetDefaultColor(); } }
/// <summary> /// Sets the default values. /// </summary> /// <param name="model">The model.</param> protected internal override void SetDefaultValues(PlotModel model) { base.SetDefaultValues(model); if (this.Color2.IsAutomatic()) { this.defaultColor2 = model.GetDefaultColor(); } if (this.LineStyle2 == LineStyle.Undefined) { this.LineStyle2 = model.GetDefaultLineStyle(); } }