title: How to reduce the gap between the Morris Bar Chart
body: <p>Scripts</p>
  
  <pre><code>&lt;link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.css"&gt;
   &lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="//cdnjs.cloudflare.com/ajax/libs/raphael/2.1.0/raphael-min.js"&gt;&lt;/script&gt;
  &lt;script src="//cdnjs.cloudflare.com/ajax/libs/morris.js/0.5.1/morris.min.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>HTML and jQuery:</p>
  
  <pre><code>&lt;div id="myfirstchart" style="height: 250px;"&gt;&lt;/div&gt;
  &lt;Script&gt;
  new Morris.Bar({
    // ID of the element in which to draw the chart.
    element: 'myfirstchart',
    // Chart data records -- each entry in this array corresponds to a point on
    // the chart.
    data: [
      { year: '2008', value: 20 },
      { year: '2009', value: 10 },
      { year: '2010', value: 5 },
      { year: '2011', value: 5 },
      { year: '2012', value: 20 }
    ],
    // The name of the data record attribute that contains x-values.
    xkey: 'year',
    // A list of names of data record attributes that contain y-values.
    ykeys: ['value'],
    // Labels for the ykeys -- will be displayed when you hover over the
    // chart.
    labels: ['Value'],
    barSize: 50
  });
  &lt;/Script&gt;
  </code></pre>
  
  <p>The chart is rendering fine but there is a lot of space between the charts.</p>
  
  <p>How to reduce the space between the bars?</p>
  
  <p>Image:</p>
  
  <p><a href="https://i.stack.imgur.com/oaukp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oaukp.png" alt="enter image description here"></a></p>