private void OnVisibleRangeChanged(object sender, VisibleRangeChangedEventArgs e) { if (sender.Equals(sciChart2NumericXAxis)) { sciChart.XAxes.ForEachDo(x => x.VisibleRange = e.NewVisibleRange); } else { sciChart2NumericXAxis.VisibleRange = e.NewVisibleRange; } }
/// <summary> /// Called when VisibleRange property changed /// </summary> protected override void OnVisibleRangeChanged(VisibleRangeChangedEventArgs e) { if (AdornmentsInfo != null && isAdornmentPending) { if (xValues != null && ActualXAxis != null && !ActualXAxis.VisibleRange.IsEmpty) { double xBase = ActualXAxis.IsLogarithmic ? (ActualXAxis as LogarithmicAxis).LogarithmicBase : 1; bool xIsLogarithmic = ActualXAxis.IsLogarithmic; double start = ActualXAxis.VisibleRange.Start; double end = ActualXAxis.VisibleRange.End; for (int i = 0; i < DataCount; i++) { double x, y; if (this.ActualXAxis is CategoryAxis && !(this.ActualXAxis as CategoryAxis).IsIndexed) { if (i < xValues.Count) { y = GroupedSeriesYValues[0][i]; x = xValues[i]; } else { return; } } else { x = xValues[i]; y = YValues[i]; } double edgeValue = xIsLogarithmic ? Math.Log(x, xBase) : x; if (edgeValue >= start && edgeValue <= end && !double.IsNaN(y)) { if (i < Adornments.Count) { Adornments[i].SetData(x, y, x, y); Adornments[i].Item = ActualData[i]; } else { Adornments.Add(this.CreateAdornment(this, x, y, x, y)); Adornments[Adornments.Count - 1].Item = ActualData[i]; } } } } isAdornmentPending = false; } }
private void OnAxisVisibleRangeChanged(object sender, VisibleRangeChangedEventArgs e) { if (Annotations != null) { foreach (Annotation annotation in this.Annotations) { if (annotation.XAxis == sender || annotation.YAxis == sender) { annotation.UpdateAnnotation(); } } } if (AnnotationResizer != null && (AnnotationResizer.XAxis == sender || AnnotationResizer.YAxis == sender)) { AnnotationResizer.UpdateAnnotation(); AnnotationResizer.MapActualValueToPixels(); } }
protected override void OnVisibleRangeChanged(VisibleRangeChangedEventArgs e) { bool isGrouped = (ActualXAxis is CategoryAxis && !(ActualXAxis as CategoryAxis).IsIndexed); if (AdornmentsInfo != null && isAdornmentsBending) { List <double> xValues = null; if (isGrouped) { xValues = GroupedXValuesIndexes; } else { xValues = GetXValues(); } if (xValues != null && ActualXAxis != null && !ActualXAxis.VisibleRange.IsEmpty) { for (int i = 0; i < DataCount; i++) { if (isGrouped) { if (i < xValues.Count) { AddAdornments(xValues[i], GroupedSeriesYValues[0][i], i); } else { return; } } else { AddAdornments(xValues[i], YValues[i], i); } } } isAdornmentsBending = false; } }
private void ExecuteEventJSON(string ea) { JsonData jsonData = SimpleJsonDeserializer.Deserialize(ea); JsonData jsonData2 = jsonData["header"]; JsonData arg_1E_0 = jsonData["data"]; JsonData jsonData3 = jsonData["parameters"]; this.StartDate = (DateTime)jsonData2["startDate"]; this.SelectionStart = (DateTime)jsonData2["selectionStart"]; string a; if ((a = (string)jsonData["action"]) != null) { if (!(a == "Visible")) { if (!(a == "TimeRangeSelected")) { goto IL_125; } if (this.TimeRangeSelected != null) { DateTime start = (DateTime)jsonData3["start"]; DateTime end = (DateTime)jsonData3["end"]; TimeRangeSelectedEventArgs timeRangeSelectedEventArgs = new TimeRangeSelectedEventArgs(start, end, null); timeRangeSelectedEventArgs.Source = (this.Page.IsCallback ? EventSource.CallBack : EventSource.PostBack); this.TimeRangeSelected(this, timeRangeSelectedEventArgs); return; } } else if (this.VisibleRangeChanged != null) { VisibleRangeChangedEventArgs visibleRangeChangedEventArgs = new VisibleRangeChangedEventArgs(); visibleRangeChangedEventArgs.Source = (this.Page.IsCallback ? EventSource.CallBack : EventSource.PostBack); this.VisibleRangeChanged(this, visibleRangeChangedEventArgs); return; } return; } IL_125: throw new NotSupportedException("This action type is not supported: " + jsonData["action"]); }
protected override void OnVisibleRangeChanged(VisibleRangeChangedEventArgs e) { if (AdornmentsInfo != null && isAdornmentPending) { List <double> xValues = null; var isGrouped = ActualXAxis is CategoryAxis && !(ActualXAxis as CategoryAxis).IsIndexed; if (isGrouped) { xValues = GroupedXValuesIndexes; } else { xValues = GetXValues(); } if (xValues != null && ActualXAxis != null && !ActualXAxis.VisibleRange.IsEmpty) { double xBase = ActualXAxis.IsLogarithmic ? (ActualXAxis as LogarithmicAxis).LogarithmicBase : 1; double start = ActualXAxis.VisibleRange.Start; double end = ActualXAxis.VisibleRange.End; if (isGrouped) { for (int i = 0; i < xValues.Count; i++) { if (i < xValues.Count) { double x = xValues[i]; double actualX = ActualXAxis.IsLogarithmic ? Math.Log(x, xBase) : x; if (actualX >= start && actualX <= end) { double y = GroupedSeriesYValues[0][i]; if (i < Adornments.Count) { Adornments[i].SetData(x, y, x, y); } else { Adornments.Add(this.CreateAdornment(this, x, y, x, y)); } Adornments[i].Item = ActualData[i]; } } } } else { for (int i = 0; i < DataCount; i++) { double x = xValues[i]; double actualX = ActualXAxis.IsLogarithmic ? Math.Log(x, xBase) : x; if (actualX >= start && actualX <= end) { double y = YValues[i]; if (i < Adornments.Count) { Adornments[i].SetData(x, y, x, y); } else { Adornments.Add(this.CreateAdornment(this, x, y, x, y)); } Adornments[i].Item = ActualData[i]; } } } } isAdornmentPending = false; } }
private void OnXVisibleRangeChanged(object sender, VisibleRangeChangedEventArgs e) { ((ToValidDateTimeConverter)grid.Resources["ToValidDateTimeConverter"]).XVisibleRange = (DateRange)xAxis.VisibleRange; }
/// <summary> /// Called when VisibleRange property changed /// </summary> protected virtual void OnVisibleRangeChanged(VisibleRangeChangedEventArgs e) { }
internal void OnVisibleRangeChanged(object sender, VisibleRangeChangedEventArgs e) { OnVisibleRangeChanged(e); }
private void VisibleRangeChanged(object sender, VisibleRangeChangedEventArgs e) { var range = ColumnXAxis.ToDateRange((IndexRange)e.NewVisibleRange); BubbleXAxis.VisibleRange = range; }
private void OnVisibleRangeChanged(object sender, VisibleRangeChangedEventArgs e) { _isUpdating = true; ZoomScaleFactor = Math.Log10(GetZoomScaleFactor()); _isUpdating = false; }
/// <summary> /// Updates the series when visible range changed. /// </summary> /// <param name="sender">The Sender</param> /// <param name="e">The Event Arguments</param> private void OnVisibleRangeChanged(object sender, VisibleRangeChangedEventArgs e) { this.OnVisibleRangeChanged(e); }