Skip to content

AddSignalXYConst display glitch with DateTimeFormat = true #783

@AlgoExecutor

Description

@AlgoExecutor

First: thanks for the amazing work so far! :-)

Since I use the project for the first time I do not exclude that I use it possibly wrong. I have noticed visual differences between AddSignalXY and AddSignalXYConst. After a temporal gap, the values before the gap are displayed resulting in a short spike. I use DateTimeFormat = true for the XAxis. Here are some pictures to see the visual better:
image

Here are in more Detail:
image

Sometimes disappears when zoomed in:
image

Data looks like this:
2021-02-09T09:12:43.12+01:00;105.44;105.02;
2021-02-09T09:12:58.08+01:00;105.0;104.82;
2021-02-09T09:12:58.09+01:00;104.98;104.84;
2021-02-09T09:13:00.75+01:00;105.0;104.84;
(Blue line is the second value)

Using: ScottPlot 4.1.6-beta

formsPlot.Plot.AddSignalXYConst(xDate.ToArray(), ci.Xetra.Select(x => (double)x.BestBidPrice).ToArray(), label: "Bid");
formsPlot.Plot.AddSignalXYConst(xDate.ToArray(), ci.Xetra.Select(x => (double)x.BestAskPrice).ToArray(), label: "Ask");
formsPlot.Plot.XAxis.DateTimeFormat(true);
formsPlot.Plot.Title($"Test");
formsPlot.Render();

Thanks!

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