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

Step plot #2442

Open
limx0 opened this issue Nov 20, 2023 · 4 comments
Open

Step plot #2442

limx0 opened this issue Nov 20, 2023 · 4 comments
Labels
enhancement Feature requests or improvements

Comments

@limx0
Copy link

limx0 commented Nov 20, 2023

Feature Request

Description of Problem:

When viewing financial market data, it often makes sense to view a line plot as a "step" plot rather than a plain line plot (see example below), because it fits more accurately with our view of the values; an ask price that moves from 19 to 20 does not move in an interpolated fashion as the line plot shows, it is 19 until an order is cancelled or fill and then is is 20.

Screenshot 2023-11-20 at 12 15 09 pm

Plot source: https://hvplot.holoviz.org/user_guide/Plotting.html#step

It would be a great feature if perspective could support these kinds of plots.

Potential Solutions:

N/A

@texodus texodus added the enhancement Feature requests or improvements label Nov 20, 2023
@timkpaine
Copy link
Member

timkpaine commented Nov 20, 2023

Unclear if this should be a separate chart or an option on line, I'd opt for the latter now that we have a nice UI for it?
d3fc/d3fc#698

    line.interpolate('step');

@texodus
Copy link
Member

texodus commented Nov 20, 2023

Ah this may be easy then. We are lacking real estate for column-unaffiliated plugin settings at the moment.

@timkpaine
Copy link
Member

timkpaine commented Nov 20, 2023

Should it be column unaffiliated? I know there are at least 3 interpolations which are useful, but I don't think you'd mix them. But it's a minor inconvenience to set per-column manually.

Edit: A nice reference: http://nickqizhu.github.io/d3-cookbook/src/chapter7/line-interpolation.html I would use linear obviously, plus step and monotone

@limx0
Copy link
Author

limx0 commented Nov 20, 2023

Good resource; for clarification on the issue, I'm specifically looking for step-after.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests or improvements
Projects
None yet
Development

No branches or pull requests

3 participants