Skip x axis values for which there are no price (y) values

Hi there,

I’m interested in removing or skipping over x axis values for which there are no corresponding y values.
I am using plotly finance to plot a bar chart, such as in the example below, and would like to remove the weekend gap for which there is no price data.

Others have asked similar questions, like https://community.plotly.com/t/skip-missing-dates-in-time-series-graph/1121
The solution fig.layout.xaxis.type = 'category' did not work for me. I’m assuming plotly finance requires type = 'date'

Any help would be much appreciated.

Thanks!

1 Like

You can try using a filter transform (see example here).

Thanks for the response!
I couldn’t get the filter transform to work. Sorry if I wasn’t clear enough–is there any way to skip over x axis values for which there is no y data?
In the picture above for example, Oct 22 and Oct 23 would be removed from the x axis, effectively merging the graph into a continuous function.

Please let me know if you can think of anything.

Thanks again!

1 Like

Hi,i am dealing with these problem these days.Have you figure it out yet?

1 Like

Probable hints maybe help you (Example here)

Another issue that’s refer similar problem