Dashed trend line with R plotly
<p>How to get a dashed trend line with the <code>plotly</code> package ?
According to the documentation, it should be:</p>

<pre><code>dat &lt;- iris[,2:3]
colnames(dat) &lt;- c("x","y")
p &lt;- plot_ly(dat, x = x, y = y, type="scatter", mode="markers", name="data")
add_trace(p, x = x, y = fitted(lm(y~x, data=dat)), line = list(dash="dashed"), name="regression line")
</code></pre>

<p>But the trend line is solid.</p>