Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pop time series data #1518

Open
tpunt opened this issue Feb 13, 2024 · 2 comments
Open

Pop time series data #1518

tpunt opened this issue Feb 13, 2024 · 2 comments
Labels
needs investigation Needs further investigation. proposal This issue is a proposal, usually non-trivial change.
Milestone

Comments

@tpunt
Copy link

tpunt commented Feb 13, 2024

Is your feature request related to a problem? Please describe.

I have implemented bar replay mode in my personal app. This is for things such as analysing price data as well as looking back at my past trades. Today, I don't believe there is a nice way to revert the latest bar(s). I have to perform a setData() operation on the time series, which resets the axes. This is the biggest pain point in the UX, since you often do not want the candles to be snapped back the right-hand side of the chart (especially with line titles enabled).

I have created a PoC here: https://github.com/tpunt/lightweight-charts/tree/bar-pop

Describe the solution you'd like

I'd like to be able to simply remove bars from the end of the time series. This will provide a smooth UX when in replay mode.

Additional context

This is a demo of what I mean:

Screen.Recording.2024-02-13.at.09.08.33.mov
@tpunt
Copy link
Author

tpunt commented Feb 18, 2024

I've managed to update my private fork to the latest version and integrate the time series popping ability. The above now looks like the following:

Screen.Recording.2024-02-18.at.15.03.31.mov

It is almost exactly what I want. When popping a candlestick, the chart does jump 1 bar to the right still, but this is good enough for now.

I hope this better demonstrates the usefulness of this feature.

@SlicedSilver SlicedSilver added needs investigation Needs further investigation. proposal This issue is a proposal, usually non-trivial change. labels May 8, 2024
@SlicedSilver SlicedSilver modified the milestones: 5.0, Future May 8, 2024
@SlicedSilver
Copy link
Contributor

Thanks @tpunt, we will have a more detailed look into this during our work for the next major release of the library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation Needs further investigation. proposal This issue is a proposal, usually non-trivial change.
Projects
None yet
Development

No branches or pull requests

2 participants