predict-idlab / plotly-resampler

Visualize large time series data with plotly.py
https://predict-idlab.github.io/plotly-resampler/latest
MIT License
1.02k stars 66 forks source link

Are Candlestick charts exporter? #98

Open piotryordanov opened 2 years ago

piotryordanov commented 2 years ago

Hello and thank you for this awesome project.

It works fine for normal arrays, but it doesn't seem to do anything for candlestick charts. Is this normal?

Thx in advance! Piotr

jvdd commented 2 years ago

Hi @piotryordanov,

This toolkit was built with our use-case in mind; enabling visualization of large time series (mostly in the research domain). At the moment, this does not include candle stick support.

However, I believe (after a brief discussion with @jonasvdd) that supporting candlesticks should be feasible. @jonasvdd or me will give it a look in the near future.

Cheers, Jeroen

jesusdfc commented 1 year ago

Hello!

First, congratulations for this excelent tool, its amazing. Then, I was wondering if there has been any advance on chandlesticks support.

Best, Jesús.

jvdd commented 1 year ago

Hi @jesusdfc,

We're glad to hear that you're enjoying our toolkit! :)

Upon further consideration of this issue, we have determined that there is little benefit in adding dynamic aggregation to candlesticks for two reasons:

  1. Candlesticks their data format is distinct from scatters, so it would likely require quite some additional functionality.
  2. Based on our understanding of the financial use case for candlesticks, it seems more reasonable to aggregate them for fixed bins (e.g., 4h, 1h, or 1d), rather than for dynamic bins based on the current view (e.g., 3.87h).

We are interested in hearing your thoughts on this!

Best regards, Jeroen

jesusdfc commented 1 year ago

Hi @jvdd:

You are completely right, it would only make sense to aggregate the candlesticks according to a predefined fixed bins, and dynamically go up or down depending on the specified zoom. Is this already implemented? Is there an easy way to implement this?

Best regards, Jesús.

jvdd commented 1 year ago

Hi @jesusdfc

That functionality is not implemented in this toolkit - perhaps other toolkits (that I currently do not know of) might support this?

It is certainly feasible to add support for this (you can nearly do anything with code). But, this functionality has very low priority for us. Of course, you can always contribute this yourself via a pull request - we will gladly review this & provide feedback!

Cheers, Jeroen