diff --git a/Source/OxyPlot.Avalonia/Annotations/ArrowAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/ArrowAnnotation.cs index fbd441f..a1f8259 100644 --- a/Source/OxyPlot.Avalonia/Annotations/ArrowAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/ArrowAnnotation.cs @@ -74,7 +74,6 @@ public class ArrowAnnotation : TextualAnnotation static ArrowAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); ArrowDirectionProperty.Changed.AddClassHandler(DataChanged); ColorProperty.Changed.AddClassHandler(AppearanceChanged); diff --git a/Source/OxyPlot.Avalonia/Annotations/EllipseAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/EllipseAnnotation.cs index 1250aae..7d34eb3 100644 --- a/Source/OxyPlot.Avalonia/Annotations/EllipseAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/EllipseAnnotation.cs @@ -32,7 +32,6 @@ public class EllipseAnnotation : ShapeAnnotation static EllipseAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); XProperty.Changed.AddClassHandler(DataChanged); YProperty.Changed.AddClassHandler(DataChanged); diff --git a/Source/OxyPlot.Avalonia/Annotations/FunctionAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/FunctionAnnotation.cs index c22a010..e354c1a 100644 --- a/Source/OxyPlot.Avalonia/Annotations/FunctionAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/FunctionAnnotation.cs @@ -41,13 +41,12 @@ public class FunctionAnnotation : PathAnnotation static FunctionAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); TextHorizontalAlignmentProperty.OverrideDefaultValue(HorizontalAlignment.Right); - TextHorizontalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); TextVerticalAlignmentProperty.OverrideDefaultValue(VerticalAlignment.Top); - TextVerticalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); TypeProperty.Changed.AddClassHandler(DataChanged); + EquationProperty.Changed.AddClassHandler(DataChanged); + ResolutionProperty.Changed.AddClassHandler(DataChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Annotations/LineAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/LineAnnotation.cs index 8fbe274..7dab3aa 100644 --- a/Source/OxyPlot.Avalonia/Annotations/LineAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/LineAnnotation.cs @@ -70,11 +70,8 @@ public class LineAnnotation : PathAnnotation static LineAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); TextHorizontalAlignmentProperty.OverrideDefaultValue(HorizontalAlignment.Right); - TextHorizontalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); TextVerticalAlignmentProperty.OverrideDefaultValue(VerticalAlignment.Top); - TextVerticalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); TypeProperty.Changed.AddClassHandler(DataChanged); InterceptProperty.Changed.AddClassHandler(DataChanged); diff --git a/Source/OxyPlot.Avalonia/Annotations/PointAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/PointAnnotation.cs index d3750e5..890e870 100644 --- a/Source/OxyPlot.Avalonia/Annotations/PointAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/PointAnnotation.cs @@ -49,9 +49,7 @@ public class PointAnnotation : ShapeAnnotation static PointAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); TextVerticalAlignmentProperty.OverrideDefaultValue(VerticalAlignment.Top); - TextVerticalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); XProperty.Changed.AddClassHandler(DataChanged); YProperty.Changed.AddClassHandler(DataChanged); diff --git a/Source/OxyPlot.Avalonia/Annotations/PolygonAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/PolygonAnnotation.cs index 7482425..991a4c4 100644 --- a/Source/OxyPlot.Avalonia/Annotations/PolygonAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/PolygonAnnotation.cs @@ -39,7 +39,6 @@ public class PolygonAnnotation : ShapeAnnotation static PolygonAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); LineJoinProperty.Changed.AddClassHandler(AppearanceChanged); LineStyleProperty.Changed.AddClassHandler(AppearanceChanged); diff --git a/Source/OxyPlot.Avalonia/Annotations/PolylineAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/PolylineAnnotation.cs index 33772d0..529c951 100644 --- a/Source/OxyPlot.Avalonia/Annotations/PolylineAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/PolylineAnnotation.cs @@ -40,13 +40,11 @@ public class PolylineAnnotation : PathAnnotation static PolylineAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); TextHorizontalAlignmentProperty.OverrideDefaultValue(HorizontalAlignment.Right); - TextHorizontalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); TextVerticalAlignmentProperty.OverrideDefaultValue(VerticalAlignment.Top); - TextVerticalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); InterpolationAlgorithmProperty.Changed.AddClassHandler(DataChanged); + MinimumSegmentLengthProperty.Changed.AddClassHandler(DataChanged); PointsProperty.Changed.AddClassHandler(DataChanged); } diff --git a/Source/OxyPlot.Avalonia/Annotations/RectangleAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/RectangleAnnotation.cs index 6c9f0a1..1258f7c 100644 --- a/Source/OxyPlot.Avalonia/Annotations/RectangleAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/RectangleAnnotation.cs @@ -42,7 +42,6 @@ public class RectangleAnnotation : ShapeAnnotation static RectangleAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); MaximumXProperty.Changed.AddClassHandler(DataChanged); MaximumYProperty.Changed.AddClassHandler(DataChanged); diff --git a/Source/OxyPlot.Avalonia/Annotations/TextAnnotation.cs b/Source/OxyPlot.Avalonia/Annotations/TextAnnotation.cs index 7f19a3e..1be94e2 100644 --- a/Source/OxyPlot.Avalonia/Annotations/TextAnnotation.cs +++ b/Source/OxyPlot.Avalonia/Annotations/TextAnnotation.cs @@ -50,11 +50,8 @@ public class TextAnnotation : TextualAnnotation static TextAnnotation() { TextColorProperty.OverrideDefaultValue(MoreColors.Automatic); - TextColorProperty.Changed.AddClassHandler(AppearanceChanged); TextHorizontalAlignmentProperty.OverrideDefaultValue(HorizontalAlignment.Right); - TextHorizontalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); TextVerticalAlignmentProperty.OverrideDefaultValue(VerticalAlignment.Top); - TextVerticalAlignmentProperty.Changed.AddClassHandler(AppearanceChanged); BackgroundProperty.Changed.AddClassHandler(AppearanceChanged); OffsetProperty.Changed.AddClassHandler(AppearanceChanged); diff --git a/Source/OxyPlot.Avalonia/Axes/AngleAxis.cs b/Source/OxyPlot.Avalonia/Axes/AngleAxis.cs index b81521c..dffdf32 100644 --- a/Source/OxyPlot.Avalonia/Axes/AngleAxis.cs +++ b/Source/OxyPlot.Avalonia/Axes/AngleAxis.cs @@ -41,8 +41,6 @@ static AngleAxis() IsZoomEnabledProperty.OverrideMetadata(typeof(AngleAxis), new StyledPropertyMetadata(false)); StartAngleProperty.Changed.AddClassHandler(AppearanceChanged); EndAngleProperty.Changed.AddClassHandler(AppearanceChanged); - PositionProperty.Changed.AddClassHandler(AppearanceChanged); - TickStyleProperty.Changed.AddClassHandler(AppearanceChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Axes/Axis.cs b/Source/OxyPlot.Avalonia/Axes/Axis.cs index a2c595a..172f055 100644 --- a/Source/OxyPlot.Avalonia/Axes/Axis.cs +++ b/Source/OxyPlot.Avalonia/Axes/Axis.cs @@ -1599,6 +1599,8 @@ static Axis() FontWeightProperty.Changed.AddClassHandler(AppearanceChanged); IntervalLengthProperty.Changed.AddClassHandler(AppearanceChanged); IsAxisVisibleProperty.Changed.AddClassHandler(AppearanceChanged); + IsPanEnabledProperty.Changed.AddClassHandler(AppearanceChanged); + IsZoomEnabledProperty.Changed.AddClassHandler(AppearanceChanged); KeyProperty.Changed.AddClassHandler(DataChanged); LabelFormatterProperty.Changed.AddClassHandler(AppearanceChanged); LayerProperty.Changed.AddClassHandler(AppearanceChanged); diff --git a/Source/OxyPlot.Avalonia/Axes/CategoryAxis.cs b/Source/OxyPlot.Avalonia/Axes/CategoryAxis.cs index 1cca98d..09242bd 100644 --- a/Source/OxyPlot.Avalonia/Axes/CategoryAxis.cs +++ b/Source/OxyPlot.Avalonia/Axes/CategoryAxis.cs @@ -53,6 +53,7 @@ static CategoryAxis() MinimumPaddingProperty.OverrideMetadata(typeof(CategoryAxis), new StyledPropertyMetadata(0.0)); MaximumPaddingProperty.OverrideMetadata(typeof(CategoryAxis), new StyledPropertyMetadata(0.0)); MajorStepProperty.OverrideMetadata(typeof(CategoryAxis), new StyledPropertyMetadata(1.0)); + GapWidthProperty.Changed.AddClassHandler(DataChanged); IsTickCenteredProperty.Changed.AddClassHandler(DataChanged); ItemsProperty.Changed.AddClassHandler(DataChanged); LabelFieldProperty.Changed.AddClassHandler(DataChanged); diff --git a/Source/OxyPlot.Avalonia/Axes/DateTimeAxis.cs b/Source/OxyPlot.Avalonia/Axes/DateTimeAxis.cs index d635017..fc1b115 100644 --- a/Source/OxyPlot.Avalonia/Axes/DateTimeAxis.cs +++ b/Source/OxyPlot.Avalonia/Axes/DateTimeAxis.cs @@ -56,10 +56,12 @@ public class DateTimeAxis : Axis static DateTimeAxis() { PositionProperty.OverrideDefaultValue(AxisPosition.Bottom); - PositionProperty.Changed.AddClassHandler(AppearanceChanged); CalendarWeekRuleProperty.Changed.AddClassHandler(DataChanged); FirstDayOfWeekProperty.Changed.AddClassHandler(DataChanged); MinorIntervalTypeProperty.Changed.AddClassHandler(DataChanged); + IntervalTypeProperty.Changed.AddClassHandler(DataChanged); + FirstDateTimeProperty.Changed.AddClassHandler(DataChanged); + LastDateTimeProperty.Changed.AddClassHandler(DataChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Axes/LinearAxis.cs b/Source/OxyPlot.Avalonia/Axes/LinearAxis.cs index 7dcfbdf..43fb1cf 100644 --- a/Source/OxyPlot.Avalonia/Axes/LinearAxis.cs +++ b/Source/OxyPlot.Avalonia/Axes/LinearAxis.cs @@ -31,6 +31,16 @@ public class LinearAxis : Axis /// public static readonly StyledProperty FractionUnitSymbolProperty = AvaloniaProperty.Register(nameof(FractionUnitSymbol)); + /// + /// Initializes static members of the class. + /// + static LinearAxis() + { + FormatAsFractionsProperty.Changed.AddClassHandler(AppearanceChanged); + FractionUnitProperty.Changed.AddClassHandler(AppearanceChanged); + FractionUnitSymbolProperty.Changed.AddClassHandler(AppearanceChanged); + } + /// /// Initializes a new instance of the class. /// diff --git a/Source/OxyPlot.Avalonia/Axes/MagnitudeAxis.cs b/Source/OxyPlot.Avalonia/Axes/MagnitudeAxis.cs index 5a428ca..de0ef92 100644 --- a/Source/OxyPlot.Avalonia/Axes/MagnitudeAxis.cs +++ b/Source/OxyPlot.Avalonia/Axes/MagnitudeAxis.cs @@ -25,7 +25,6 @@ static MagnitudeAxis() MajorGridlineStyleProperty.OverrideDefaultValue(LineStyle.Solid); MinorGridlineStyleProperty.OverrideDefaultValue(LineStyle.Solid); PositionProperty.OverrideDefaultValue(AxisPosition.None); - PositionProperty.Changed.AddClassHandler(AppearanceChanged); IsPanEnabledProperty.OverrideDefaultValue(false); IsZoomEnabledProperty.OverrideDefaultValue(false); } diff --git a/Source/OxyPlot.Avalonia/Series/BarSeries/BarSeriesBase.cs b/Source/OxyPlot.Avalonia/Series/BarSeries/BarSeriesBase.cs index 6440597..ace86d3 100644 --- a/Source/OxyPlot.Avalonia/Series/BarSeries/BarSeriesBase.cs +++ b/Source/OxyPlot.Avalonia/Series/BarSeries/BarSeriesBase.cs @@ -85,19 +85,20 @@ public class BarSeriesBase : CategorizedSeries static BarSeriesBase() { TrackerFormatStringProperty.OverrideMetadata(typeof(BarSeriesBase), new StyledPropertyMetadata(OxyPlot.Series.BarSeries.DefaultTrackerFormatString)); - BaseValueProperty.Changed.AddClassHandler(AppearanceChanged); + // BaseValue, IsStacked and StackGroup change the range of values, which the core + // recalculates only when the data is updated + BaseValueProperty.Changed.AddClassHandler(DataChanged); ColorFieldProperty.Changed.AddClassHandler(DataChanged); FillColorProperty.Changed.AddClassHandler(AppearanceChanged); - IsStackedProperty.Changed.AddClassHandler(AppearanceChanged); + IsStackedProperty.Changed.AddClassHandler(DataChanged); LabelFormatStringProperty.Changed.AddClassHandler(AppearanceChanged); LabelMarginProperty.Changed.AddClassHandler(AppearanceChanged); LabelPlacementProperty.Changed.AddClassHandler(AppearanceChanged); NegativeFillColorProperty.Changed.AddClassHandler(AppearanceChanged); - StackGroupProperty.Changed.AddClassHandler(AppearanceChanged); + StackGroupProperty.Changed.AddClassHandler(DataChanged); StrokeColorProperty.Changed.AddClassHandler(AppearanceChanged); StrokeThicknessProperty.Changed.AddClassHandler(AppearanceChanged); ValueFieldProperty.Changed.AddClassHandler(DataChanged); - TrackerFormatStringProperty.Changed.AddClassHandler(AppearanceChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Series/BoxPlotSeries.cs b/Source/OxyPlot.Avalonia/Series/BoxPlotSeries.cs index 4882dbf..a667491 100644 --- a/Source/OxyPlot.Avalonia/Series/BoxPlotSeries.cs +++ b/Source/OxyPlot.Avalonia/Series/BoxPlotSeries.cs @@ -103,7 +103,6 @@ static BoxPlotSeries() StrokeProperty.Changed.AddClassHandler(AppearanceChanged); StrokeThicknessProperty.Changed.AddClassHandler(AppearanceChanged); WhiskerWidthProperty.Changed.AddClassHandler(AppearanceChanged); - TrackerFormatStringProperty.Changed.AddClassHandler(AppearanceChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Series/DataPointSeries.cs b/Source/OxyPlot.Avalonia/Series/DataPointSeries.cs index b18f665..8ea9eec 100644 --- a/Source/OxyPlot.Avalonia/Series/DataPointSeries.cs +++ b/Source/OxyPlot.Avalonia/Series/DataPointSeries.cs @@ -123,6 +123,7 @@ static DataPointSeries() CanTrackerInterpolatePointsProperty.Changed.AddClassHandler(AppearanceChanged); DataFieldXProperty.Changed.AddClassHandler(DataChanged); DataFieldYProperty.Changed.AddClassHandler(DataChanged); + MappingProperty.Changed.AddClassHandler(DataChanged); } } } \ No newline at end of file diff --git a/Source/OxyPlot.Avalonia/Series/HeatMapSeries.cs b/Source/OxyPlot.Avalonia/Series/HeatMapSeries.cs index 6e752ee..621f518 100644 --- a/Source/OxyPlot.Avalonia/Series/HeatMapSeries.cs +++ b/Source/OxyPlot.Avalonia/Series/HeatMapSeries.cs @@ -65,11 +65,14 @@ static HeatMapSeries() { TrackerFormatStringProperty.OverrideMetadata(typeof(HeatMapSeries), new StyledPropertyMetadata(OxyPlot.Series.HeatMapSeries.DefaultTrackerFormatString)); DataProperty.Changed.AddClassHandler(DataChanged); - X0Property.Changed.AddClassHandler(AppearanceChanged); - X1Property.Changed.AddClassHandler(AppearanceChanged); - Y0Property.Changed.AddClassHandler(AppearanceChanged); - Y1Property.Changed.AddClassHandler(AppearanceChanged); - TrackerFormatStringProperty.Changed.AddClassHandler(AppearanceChanged); + + // The core computes the series bounds in UpdateMaxMin, that is, only when the data is updated: + // otherwise the axes are not rescaled to the new coordinates. + X0Property.Changed.AddClassHandler(DataChanged); + X1Property.Changed.AddClassHandler(DataChanged); + Y0Property.Changed.AddClassHandler(DataChanged); + Y1Property.Changed.AddClassHandler(DataChanged); + ColorAxisKeyProperty.Changed.AddClassHandler(AppearanceChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Series/LineSeries.cs b/Source/OxyPlot.Avalonia/Series/LineSeries.cs index 93d436d..dcc8df3 100644 --- a/Source/OxyPlot.Avalonia/Series/LineSeries.cs +++ b/Source/OxyPlot.Avalonia/Series/LineSeries.cs @@ -144,7 +144,12 @@ static LineSeries() MarkerTypeProperty.Changed.AddClassHandler(AppearanceChanged); MinimumSegmentLengthProperty.Changed.AddClassHandler(AppearanceChanged); StrokeThicknessProperty.Changed.AddClassHandler(AppearanceChanged); - CanTrackerInterpolatePointsProperty.Changed.AddClassHandler(AppearanceChanged); + LabelFormatStringProperty.Changed.AddClassHandler(AppearanceChanged); + LabelMarginProperty.Changed.AddClassHandler(AppearanceChanged); + LineLegendPositionProperty.Changed.AddClassHandler(AppearanceChanged); + + // The core recalculates the smoothed points only when the data is updated + InterpolationAlgorithmProperty.Changed.AddClassHandler(DataChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Series/PieSeries.cs b/Source/OxyPlot.Avalonia/Series/PieSeries.cs index 0974308..4674afa 100644 --- a/Source/OxyPlot.Avalonia/Series/PieSeries.cs +++ b/Source/OxyPlot.Avalonia/Series/PieSeries.cs @@ -154,11 +154,11 @@ static PieSeries() TickRadialLengthProperty.Changed.AddClassHandler(AppearanceChanged); TickHorizontalLengthProperty.Changed.AddClassHandler(AppearanceChanged); TickLabelDistanceProperty.Changed.AddClassHandler(AppearanceChanged); + ExplodedDistanceProperty.Changed.AddClassHandler(AppearanceChanged); LabelFieldProperty.Changed.AddClassHandler(DataChanged); ValueFieldProperty.Changed.AddClassHandler(DataChanged); ColorFieldProperty.Changed.AddClassHandler(DataChanged); IsExplodedFieldProperty.Changed.AddClassHandler(DataChanged); - TrackerFormatStringProperty.Changed.AddClassHandler(AppearanceChanged); } /// diff --git a/Source/OxyPlot.Avalonia/Series/Series.cs b/Source/OxyPlot.Avalonia/Series/Series.cs index 8f95b98..3f4091a 100644 --- a/Source/OxyPlot.Avalonia/Series/Series.cs +++ b/Source/OxyPlot.Avalonia/Series/Series.cs @@ -64,8 +64,12 @@ public abstract class Series : ItemsControl /// static Series() { - IsVisibleProperty.Changed.AddClassHandler(AppearanceChanged); + // The core loads the data and computes the axis ranges only for visible series and only + // when the data is updated. Therefore showing and hiding a series is a data change. + IsVisibleProperty.Changed.AddClassHandler(DataChanged); BackgroundProperty.Changed.AddClassHandler(AppearanceChanged); + ForegroundProperty.Changed.AddClassHandler(AppearanceChanged); + FontFamilyProperty.Changed.AddClassHandler(AppearanceChanged); ColorProperty.Changed.AddClassHandler(AppearanceChanged); TitleProperty.Changed.AddClassHandler(AppearanceChanged); RenderInLegendProperty.Changed.AddClassHandler(AppearanceChanged); @@ -258,8 +262,12 @@ protected virtual void SynchronizeProperties(OxyPlot.Series.Series s) s.TrackerKey = TrackerKey; s.TrackerFormatString = TrackerFormatString; s.IsVisible = IsVisible; - s.Font = FontFamily.ToString(); - s.TextColor = Foreground.ToOxyColor(); + + // Foreground and FontFamily are inherited from the window and the theme. They are copied only if + // they are set on the series itself, otherwise the labels follow Plot.TextColor and Plot.DefaultFont, + // like those of the axes, and do not turn white on a white background in a dark theme. + s.Font = IsSet(FontFamilyProperty) ? FontFamily.ToString() : null; + s.TextColor = IsSet(ForegroundProperty) ? Foreground.ToOxyColor() : OxyColors.Automatic; s.EdgeRenderingMode = EdgeRenderingMode; } diff --git a/Source/OxyPlot.Avalonia/Series/TwoColorAreaSeries.cs b/Source/OxyPlot.Avalonia/Series/TwoColorAreaSeries.cs index 5c0223c..a6829fa 100644 --- a/Source/OxyPlot.Avalonia/Series/TwoColorAreaSeries.cs +++ b/Source/OxyPlot.Avalonia/Series/TwoColorAreaSeries.cs @@ -192,11 +192,11 @@ protected override void SynchronizeProperties(OxyPlot.Series.Series series) static TwoColorAreaSeries() { - FillProperty.Changed.AddClassHandler(AppearanceChanged); Fill2Property.Changed.AddClassHandler(AppearanceChanged); MarkerFill2Property.Changed.AddClassHandler(AppearanceChanged); MarkerStroke2Property.Changed.AddClassHandler(AppearanceChanged); - LimitProperty.Changed.AddClassHandler(AppearanceChanged); + // The core splits the points into the parts above and below the limit in UpdateData, not while rendering + LimitProperty.Changed.AddClassHandler(DataChanged); Dashes2Property.Changed.AddClassHandler(AppearanceChanged); LineStyle2Property.Changed.AddClassHandler(AppearanceChanged); } diff --git a/Source/OxyPlot.Avalonia/Series/XYAxisSeries.cs b/Source/OxyPlot.Avalonia/Series/XYAxisSeries.cs index 269429e..d1aa95c 100644 --- a/Source/OxyPlot.Avalonia/Series/XYAxisSeries.cs +++ b/Source/OxyPlot.Avalonia/Series/XYAxisSeries.cs @@ -34,7 +34,6 @@ static XYAxisSeries() TrackerFormatStringProperty.OverrideMetadata(typeof(XYAxisSeries), new StyledPropertyMetadata(OxyPlot.Series.XYAxisSeries.DefaultTrackerFormatString)); XAxisKeyProperty.Changed.AddClassHandler(AppearanceChanged); YAxisKeyProperty.Changed.AddClassHandler(AppearanceChanged); - TrackerFormatStringProperty.Changed.AddClassHandler(AppearanceChanged); } ///