Should remove breaks for OHLC, Candlestick
See original GitHub issueThe code to reproduce is based on simple-candlestick-chart-example . The difference is:
11th, 12th are not existed in the dataset (simply because they’re weekdays/non-trading days), but candlesticks in the chart should be continued, i.e.: the breaks of 11th, 12th should be removed like what highcharts do.
This behaviour should be the default one for OHLC and Candlestick charts, otherwise it will become terrible for real world dataset.
https://codepen.io/mckelvin/pen/ygwMQz is my workaround by using tickvals
and ticktext
. But there’s another problem: nticks doesn’t work when tickmode=array as mentioned in docs, there will be too many tick labels if there’re too many ticks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:7
- Comments:31 (10 by maintainers)
Top Results From Across the Web
Candlestick plot: how to remove non-trading periods? - hvPlot
Hi,. It's really great that hvplot has a candlestick chart (called ohlc ). But is there a way to get rid of the...
Read more >Remove gaps from time-series/OHLC plot - Plotly Python
Should remove breaks for OHLC, Candlestick. The code to reproduce is based on simple-candlestick-chart-example . The difference is: 11th, 12th ...
Read more >Matplotlib remove space of candlestick for missing data
So after I plotted it, it has spaces between the candlesticks. result image. How can I remove these? Here is my plotter function...
Read more >Hide space between Candlestick/OHLC chart - CanvasJS.com
You can use axis scale-breaks to remove the empty space. Also you can set spacing to 0, so that it looks continuous. —...
Read more >Python Trading Toolbox: introducing OHLC charts with ...
Removing them requires some extra non-trivial filtering. Similarly, a candlestick chart can be generated in the following way: Which produces: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In my opinion - I think it is an overkill to expect Plotly having to retrieve holidays/trading sessions for all instruments. You will also have to handle scenarios where there is multiple calendars (ie a GBP swap).
Most data providers already take into account non-trading days/market sessions into account. That means the data has already been cleaned/adjusted.
The only thing required would be a layout parameter to create an axis that will omit the dates for which no values exist in the timeseries.
In
v1.53.0
, users will be able to remove non-working days and non-working hours using the newaxis.breaks
API fortype: 'date'
cartesian axes.Some examples:
I’ll leave this issue open as some folks here appear to prefer the “date as categories” approach - which is another planned feature of ours.