Skip to content

PlotSignal with DateTime X-axis / Middle mouse zoom wrong result #351

@bukkideme

Description

@bukkideme

Describe the bug
When using the middle mouse "rectangle" zoom on a PlotSignal WinForm plot, the result shows empty graph, with no ticks and labels on X-axis. When using the right mouse click zoom options, everything works as expected.

To Reproduce
Create a Winform PlotSignal plot, and use the middle mouse zoom.

Some relevant code parts:
formsPlot1.plt.YLabel("Sensor 1 Temperature (°C)");
formsPlot1.plt.Ticks(dateTimeX: true);
formsPlot1.plt.AxisAuto();
formsPlot1.plt.AntiAlias(true, true);
formsPlot1.plt.PlotSignal(temp1Data.ToArray(), sampleRate: rate, xOffset: timeOffset.ToOADate(), color: Color.Blue, lineWidth: 2, markerSize: 6);
formsPlot1.Render();

ZoomRectangle_middleMouseButton

ZoomRectangle_middleMouseButton_Result

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