Skip to content

Plot.AxisPanCenter() fails on non-primary axes #2483

@dusko23

Description

@dusko23

Scenario:
3 plots using Primary YAxis (representing various Altitudes)
3 plots using Secondary Yaxis - YAxis2 (representing various Speeds)
All 6 plots use a common Primary Xaxis which represents Distance.

The plan:
When the relevant cell in DataGridView is clicked ScottPlot should center there and draw a circle
image

The code:
image

Parameters X, Y, and YaxisINDEX are populated correctly.
For the first 3 plots YaxisINDEX = 0
For the next 3 plots YaxisINDEX = 1

Bug Description:
Running The Code YaxixINDEX = 1 has the effect of being = 0
The plot is centered and the circle is drawn at the wrong Y position.
The Y pixel position to Center and Draw Marker is calculated from YAxis instead of YAxis2.
Please note that AddMarker does not expose the Y axis. But it should.

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