Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/LiveChartsCore/CoreAxis.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// The MIT License(MIT)
// The MIT License(MIT)
//
// Copyright(c) 2021 Alberto Rodriguez Orozco & LiveCharts Contributors
//
Expand Down Expand Up @@ -307,8 +307,6 @@ public LvcColor? CrosshairLabelsBackground
/// <inheritdoc cref="ChartElement{TDrawingContext}.Invalidate(Chart{TDrawingContext})"/>
public override void Invalidate(Chart<TDrawingContext> chart)
{
_stepCount = 0;

var cartesianChart = (CartesianChart<TDrawingContext>)chart;

var controlSize = cartesianChart.ControlSize;
Expand Down Expand Up @@ -496,6 +494,7 @@ NamePadding is not null || SeparatorsPaint is not null || LabelsPaint is not nul

var start = Math.Truncate(min / s) * s;

_stepCount = 0;
foreach (var i in EnumerateSeparators(start, max, s))
{
var separatorKey = Labelers.SixRepresentativeDigits(i - 1d + 1d);
Expand Down Expand Up @@ -879,6 +878,7 @@ public virtual LvcSize GetPossibleSize(Chart<TDrawingContext> chart)
var h = 0f;
var r = (float)LabelsRotation;

_stepCount = 0;
foreach (var i in EnumerateSeparators(start, max, s))
{
var textGeometry = new TTextGeometry
Expand Down Expand Up @@ -1031,6 +1031,7 @@ private LvcSize GetPossibleMaxLabelSize()

if (max - min == 0) return maxLabelSize;

_stepCount = 0;
foreach (var i in EnumerateSeparators(min, max, s))
{
var textGeometry = new TTextGeometry
Expand Down