title: Using an ordinal scale ('d3.scale.ordinal') for the x-axis in a bar chart
body: <p>I have a data array like this:</p>
  
  <pre><code>var data = [{"Alphabet_Type":"a"}, {"Alphabet_Type":"b"}, {"Alphabet_Type":"a"}];
  </code></pre>
  
  <p>I am using:</p>
  
  <ul>
  <li>dc.js </li>
  <li>crossfilter.js </li>
  <li>d3.js</li>
  </ul>
  
  <p>I want to create a <strong>bar chart</strong> with: </p>
  
  <ul>
  <li>the x-axis having an alphabet name, and</li>
  <li>the y-axis having number of occurrences of the alphabet.</li>
  </ul>
  
  <p><strong>Question:</strong> How can I plot a bar chart with an <strong>ordinal scale</strong> on the x-axis?</p>
  
  <p>My code:</p>
  
  <pre class="lang-js prettyprint-override"><code>var data = [{"Alphabet_Type":"a"}, {"Alphabet_Type":"b"}, {"Alphabet_Type":"a"}];
  
  var Filter = crossfilter(data);
  var Dimension = Filter.dimension(function (d) { return d.Alphabet_Type; });
  var Group = Dimension.group();
  
  dc.barChart("#bar-chart")
      .width(800) 
      .height(275) 
      .transitionDuration(0) 
      .margins({ top: 10, right: 50, bottom: 30, left: 40 })
      .dimension(Dimension) 
      .group(Group) 
      .elasticY(false)
      .elasticX(false)
      .x(d3.scale.linear().domain([-1, 10]))
      .y(d3.scale.linear().domain([0, 5]))
      .centerBar(true)
      .renderHorizontalGridLines(true)
      .renderVerticalGridLines(true)
      .brushOn(false);
  </code></pre>
  
  <p>Finally, I have another problem which is that <code>Alphabet_Type</code> is not going to have predictable values. So I need to fetch the values for <code>Alphabet_Type</code> via <strong>crossfilter.js</strong> and incorporate those values into the domain. How can I do this?</p>