title: Plotly: How to add trendline to a bar chart?
body: <p>I am trying to add <strong>trendline</strong> to bar plot which is plotted by <code>plotly</code></p>
  
  <p><strong>Code</strong>:</p>
  
  <pre><code>import plotly.express as px
  
  fig = px.bar(count, x="date", y="count",trendline="ols")
  
  fig.update_layout(
      xaxis_title="Date",
      yaxis_title = "Count"
  )
  
  fig.show()
  </code></pre>
  
  <p><strong>Error:</strong></p>
  
  <pre><code>---------------------------------------------------------------------------
  TypeError                                 Traceback (most recent call last)
  &lt;ipython-input-129-8b01de219d3c&gt; in &lt;module&gt;
  ----&gt; 1 fig = px.bar(count, x="date", y="count",trendline="ols")
        2 
        3 fig.update_layout(
        4     xaxis_title="Date",
        5     yaxis_title = "Count"
  
  TypeError: bar() got an unexpected keyword argument 'trendline'
  </code></pre>
  
  <p>Here is the<a href="https://wetransfer.com/downloads/d2c6c94f5194fc05330fbb86519da1cf20200213090442/e31aa8" rel="nofollow noreferrer"> data </a></p>
  
  <p>How can I add a trendline successfully to this plot? </p>