title: Highcharts export server layout algorithm error
body: <p>I am using the highcharts export server node module to export treemap charts. I'm trying to create a custom layoutAlgorithm. I already have this working on the client side, but when I move the code to the server I get errors. Here's some example code:</p>
  <pre><code>import * as exporter from 'highcharts-export-server';
  import Highcharts from 'highcharts';
  
  function quadrants(parent, children) {
      let width = parent.width / 2;
      let height = parent.height / 2;
  
      let areas = [
          {
              x: parent.x + width,
              y: parent.y,
              width,
              height,
          },
          {
              x: parent.x,
              y: parent.y,
              width,
              height,
          },
          {
              x: parent.x,
              y: parent.y + height,
              width,
              height,
          },
          {
              x: parent.x + width,
              y: parent.y + height,
              width,
              height,
          },
      ];
      for (let i = 0; i &lt; children.length; i++) {
          areas.push();
      }
      return areas;
  }
  
  // This is the problem line
  Highcharts.seriesTypes.treemap.prototype.quadrants = quadrants;
  
  const exportSettings = {
    // ...
    series: [
      type: 'treemap',
      levels: [{
        level: 1,
        layoutAlgorithm: 'quadrants',
      }],
    ],
    // ... 
  }
  
  return new Promise((resolve, reject) =&gt; {
    exporter.export(exportSettings, (err, res) =&gt; {
      if (err) reject(err);
      resolve(res);
    });
  });
  </code></pre>
  <p>When I run this code I get the following error</p>
  <pre><code>TypeError: Cannot read property 'treemap' of undefined
  </code></pre>
  <p>Is this the incorrect way to set the layout algorithm or is there another way to set a layout algorithm with the highcharts export server?</p>
  <p>Thanks</p>