Adding a line in the y axis with a flexible X

like this:

 Plotly.plot(gd, [{
                            x: eixoX,
                            y: eixoY,
                            mode: 'lines+markers',
                            type: 'scatter',
                            // type: 'bar',
                            name: 'ORS da Sessão',
                            height: 200,
                            marker: {
                                color: 'tomato',
                                size: 16
                            }
                        }], {
                            shapes: [{
                                type: 'line',
                                x0: '2018-01-01',
                                y0: 25,
                                x1: '2018-03-31',
                                y1: 25,
                                line: {
                                    color: 'red',
                                    width: 2
                                }
                            }, {
                                type: 'line',
                                x0: '2018-01-01',
                                y0: 36,
                                x1: '2018-03-31',
                                y1: 36,
                                line: {
                                    color: 'blue',
                                    width: 2
                                }
                            }],
                   // N.B. here!
                            yaxis: {
                                range: [0, 40]
                            },
                            xaxis: {
                                range: eixoX ?
                            }
                        });