Skip to content

SP4: Poor automatic layout behavior for empty tick labels #2606

@szescxz

Description

@szescxz

ScottPlot Version: 4.1.63

Operating System: Windows 11

Application Type: WPF

Question:
As the title says.
My current approach is to use TickLabelFormat, making it returns an empty string when it's a decimal:

<WpfPlot x:Name="plotControl" />
plotControl.Plot.BottomAxis.MinimumTickSpacing(0.5);
plotControl.Plot.BottomAxis.TickLabelFormat((d) => d % 1 == 0 ? d.ToString() : string.Empty);

However this approach causes inconsistency on layout when zooming with mouse wheel:

Metadata

Metadata

Assignees

No one assigned

    Labels

    BUGunexpected behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions