title: How can I sort the stacked bar charts in Highcharts by the sum of positive response?
body: <p>Can someone look at my bar chart and let me know how can I sort the stacks by the total positive response rate (sum of the top two green categories that are above 0%)?</p>
  <p><a href="https://jsfiddle.net/samwhite/tqLya8h1/1/" rel="nofollow noreferrer">https://jsfiddle.net/samwhite/tqLya8h1/1/</a></p>
  <pre><code>    let selection = departments.forEach((dat, d) =&gt; {
        data[dat][&quot;104&quot;].forEach((val, i) =&gt; {
          if (i&lt;2) {
            options[i].data.push(val);
          } else {
            options[i].data.push(-val);
          }
        })
      });
      
      let chart = Highcharts.chart('container', {
        chart: {
          type: 'column',
        },
        series: options
      });
  </code></pre>