title: auto resize charts to its parent div Ploty js
body: <p>how to auto size plotly.js charts to its parent div width only without getting parent div overflow.</p>
  <p>var data = [{
  type: &quot;pie&quot;,
  values: [2, 3, 4, 4],
  labels: [&quot;Wages&quot;, &quot;Operating expenses&quot;, &quot;Cost of sales&quot;, &quot;Insurance&quot;],
  textinfo: &quot;label+percent&quot;,
  textposition: &quot;outside&quot;,
  automargin: true
  }]</p>
  <p>var layout = {
  autosize: true,
  showlegend: true,
  title: &quot;Expence Status&quot;,
  }</p>
  <p>Plotly.newPlot('myChart1', data, layout)</p>