Black Lives Matter. Please consider donating to Black Girls Code today.

TickFormat without weekends

I would remove the tick corresponding to weekends , how can I do ? I can not implement d3 functions by changing tickformat

1 Like

There’s no easy solution for this at the moment unfortunately.

This example http://codepen.io/etpinard/pen/aZNMGY might help find a workaround that works for you.

Thank you etienne,
if I do this:
xaxis: {
tickvals: x,
ticktext: dates.map(d => { return (new Date(d)).toDateString(); })
}

The graph does not show the tick corresponding to weekends, and it’s perfect.
But I want now to delete weekend-gaps between tick

replacing .map with .filter should do the trick then: http://codepen.io/etpinard/pen/yJOWbW

Perfect!!! Thank you very much etienne!!

There is a way to do this for candlesticks?
I need to show a 5 days financial chart, and I have “gaps” between fridays and mondays

Applying that same filter and set the same axis tickvals and ticktext should lead to the same result for plotly.js-finance.

Nothing to do…
I still do not manage to create a chart showing the values ​​only from Monday to Friday . I continue to have gaps between Friday and Monday.