title: Angular.js, Highcharts, Phantomjs PDF printer - graphs not showing up
body: <p>I have a very odd problem. I have an Angular.js application that utilizes Highcharts as a graph rendering library. This application has to support printing to PDF, which is done using Phantomjs PDF service used in our company.</p>
  
  <p>Graphs are generated using custom directive. Simplified code:</p>
  
  <pre><code>app.directive('metricsChartMulti', [
      function () {
          return {
              ...
              link: function postLink(scope, element, attrs) {
  
                  ...
  
                  // plot data after they are loaded
                  scope.$on('DATA_LOAD_SUCCESS', function() {
  
                      var chartOptions = {
                          series: scope.series
                          ...
                      };
  
                      var chart = new Highcharts.Chart(chartOptions);
  
                  });
              }
          }
      }
  ]);
  </code></pre>
  
  <p>The series data (scope.series) are prepared in the controller which adds them to the scope. Everything works perfectly in the browser with no error. However, <strong>when I call PDF creation service based on Phantomjs2 the graphs are not rendered in the returned PDF file</strong>.</p>
  
  <p>I tried to find an error in the code, but I belive I created the app using the common best practices of Angular framework. After long debugging I found out that <strong>when I change scope.series to a static mock of data, the PDF is plotted correctly</strong>.</p>
  
  <p>In the browser (Chrome, Firefox) this makes no visible change.</p>
  
  <p>I also tried to generate PDFs using different URLs directly from Highcharts website and PDFs were created properly. To me that means there is no problem with company's PDF service.</p>
  
  <p>Any idea how to sort out this awkward situation? Thank you.</p>