title: amcharts - export chart using my own buttons outside of the chart
body: <p>I am trying to invoke export with my own buttons, outside of the chart, but am getting the following error :</p>
  
  <p><code>TypeError: AmCharts.AmExport is not a constructor</code></p>
  
  <p>I was using an example I found on stackoverflow at <a href="http://jsfiddle.net/BGuuT/2/" rel="nofollow noreferrer">http://jsfiddle.net/BGuuT/2/</a> which works by the way, but doesn't seem to in my own implementation for some reason. Maybe I have a newer version?</p>
  
  <p>I am including in my page :</p>
  
  <pre><code>amcharts-3.21.12/amcharts.js
  amcharts-3.21.12/serial.js
  amcharts-3.21.12/plugins/export/export.js
  </code></pre>
  
  <p>html is :</p>
  
  <pre><code>&lt;ul id="chart-selector"&gt;
      &lt;li class="dropdown-item" data-click="JPG"&gt;JPG&lt;/li&gt;
      &lt;li class="dropdown-item" data-click="PNG"&gt;PNG&lt;/li&gt;
      &lt;li class="dropdown-item" data-click="SVG"&gt;SVG&lt;/li&gt;
      &lt;li class="dropdown-item" data-click="CSV"&gt;CSV&lt;/li&gt;
      &lt;li class="dropdown-item" data-click="JSON"&gt;JSON&lt;/li&gt;
      &lt;li class="dropdown-item" data-click="PDF"&gt;PDF&lt;/li&gt;
      &lt;li class="dropdown-item" data-click="XLSX"&gt;XLSX&lt;/li&gt;
      &lt;li class="dropdown-item" data-click="PRINT"&gt;Print&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>I am getting the correct export value to pass here, but the constructor error still shows :</p>
  
  <pre><code>chart = AmCharts.makeChart("chart_chart", { .......... });
  
  $('body').on('click', '#chart-selector .dropdown-item', function(e) {
  
      var test = $(this).data('click');
  
      //chart download action
      var exp = new AmCharts.AmExport(chart);
          exp.init();
          exp.output({
              format: test
          });
  });
  </code></pre>
  
  <p>The only difference I can see between the mine and the link given is export.js compared to amexport_combined.js - the latter is not a file given in amcharts though. Ideas?</p>