title: Uncaught TypeError: t.getAttribute is not a function
body: <p>I am using billboard.js to create a bar graph. From last two days, it's showing an error(given below). I couldn't find any reason that why this is happening.</p>
  
  <p>Error is:  </p>
  
  <pre><code>d3.v4.min.js:2 Uncaught TypeError: t.getAttribute is not a function
      at new W (d3.v4.min.js:2)
      at V (d3.v4.min.js:2)
      at Z (d3.v4.min.js:2)
      at r.fn.init.&lt;anonymous&gt; (d3.v4.min.js:2)
      at pt.each (d3.v4.min.js:2)
      at pt.classed (d3.v4.min.js:2)
      at ChartInternal.initWithData (ChartInternal.js:242)
      at ChartInternal.init (ChartInternal.js:61)
      at new Chart (Chart.js:28)
      at Object.generate (core.js:52)
  W @ d3.v4.min.js:2
  V @ d3.v4.min.js:2
  Z @ d3.v4.min.js:2
  (anonymous) @ d3.v4.min.js:2
  each @ d3.v4.min.js:2
  classed @ d3.v4.min.js:2
  initWithData @ ChartInternal.js:242
  init @ ChartInternal.js:61
  Chart @ Chart.js:28
  generate @ core.js:52
  createBarGraph @ reports.js:59
  initialize @ reports.js:12
  (anonymous) @ reports.js:90
  </code></pre>
  
  <p>And my <strong>javascript function</strong> for graph generation is below (<strong>Note</strong>, I have been using the same code from last 2 weeks and it was working, but now the same code shows error).</p>
  
  <pre><code>var app = {
      initialize: function() {
          const instance = this;
  
          var barGraphContainer = $("#barGraph");
          this.createBarGraph(barGraphContainer);
      },
  
      /**
       * Generates BarChart using generate function of billboard.js
       * 
       * @param {HTML Tag} graphElement
       */
      createBarGraph: function(graphElement) {
          // bar chart
          var barchart = bb.generate({
              data: {
                  columns: [
                      ["Monthly Usage", 120, 230, 212, 180, 140, 170, 120, 230, 212, 180, 140, 170]
                  ],
                  type: "bar",
              },
              bar: {
                  width: {
                      ratio: 0.3,
                      max: 300
                  }
              },
  
              color: {
                  pattern: ["#99ff66"]
              },
  
              axis: {
                  x: {
                      type: "category",
                      // label: "Your X-axis",
                      categories: ["Jun'16","Jul'16","Aug'16","Sept'16","Oct'16","Nov'16", "Dec'16","Jan'17","Feb'17","Mar'17","Apr'17","May'17"]
                  }
              },
  
              bindto: barGraphContainer
          });
      }
  }
  
  $(function() {
      app.initialize();
  });
  </code></pre>