/// <summary> /// Detect if plotting setting changed. If true, then re-plot the axis & gridline /// </summary> /// <param name="orientation"></param> private void TryUpdatePlottingSettings(AxisType orientation) { if (!this.IsLoaded) { return; } var newValue = GetPlottingSettings(orientation); switch (orientation) { case AxisType.X: if (this._horizontalPlottingRangeSetting != newValue) { this._horizontalPlottingRangeSetting = newValue; this.HorizontalSettingChanged?.Invoke(newValue); } break; case AxisType.Y: if (this._verticalPlottingRangeSetting != newValue) { this._verticalPlottingRangeSetting = newValue; this.VerticalSettingChanged?.Invoke(newValue); } break; default: throw new ArgumentOutOfRangeException(nameof(orientation), orientation, null); } }
private void AxisBase_CanvasSettingChanged(PlottingRangeBase obj) { if (obj == null) { return; } this.PlottingRangeSetting = obj; }