I get duration by substract a reference date (early in 2010 in the graph above) to the set of date. So, x and X2 axes have to be linked together.
When sliding x axes, i would like slide also the x2 axis.
How are you sliding the x-axis? If you pan by dragging in the middle of the chart I would expect the two xaxes to slide together. But if you click and drag on either xaxis then this would slide only the axis you’re clicking on.
I don’t know of a way to force the axis drag to pan both axes. If you’re displaying the plot using plotly.offline.iplot/plot, you could disable the axis dragging, so that the only way to pan is to click in the middle of the plot. Here’s how that would look.