title: Adding a link to each stacked bar chart item
body: <p>I have a stacked bar chart I am trying to make each item in the chart that is clicked open the sharepoint view based on what was clicked.</p>
  
  <p>I am building the data here</p>
  
  <pre><code>seriesData.push({ name: xStatus[i], data: dataArray, url: countArray[i].url });
  </code></pre>
  
  <p>my chart code looks like this:</p>
  
  <pre><code>loadStackedBarChartWithLink = function (xCategories, seriesData, divId, chartTitle, yAxisTitle) {
      //Build Stacked Bar Chart
      $(divId).highcharts({
          chart: {
              type: 'bar'
          },
          credits: {
              enabled: false
          },
          title: {
              text: chartTitle
          },
          xAxis: {
              categories: xCategories,
              allowDecimals: false
          },
          yAxis: {
              min: 0,
              allowDecimals: false,
              title: {
                  text: yAxisTitle
              }
          },
          legend: {
              backgroundColor: '#FFFFFF',
              reversed: true
          },
          plotOptions: {
              series: {
                  cursor: 'pointer',
                  stacking: 'normal',
                  point: {
                      events: {
                          click: function () {
                              location.href = this.options.url;
                          }
                      }
                  }
              }
          },
          series: seriesData            
      });
  }
  </code></pre>
  
  <p>The chart has the correct data, pointer is correct but I get 'undefined' for the url.</p>
  
  <p>Any help is greatly appreciated.</p>
  
  <pre><code>IWSChartBuilder.PersonEngagementsByStatusChart = function () {
  var load = function () {
      $.when(            
          IWSChartBuilder.RESTQuery.execute(GET THE DATA HERE)
      ).done(
          function (engagements1) {
              var data = [];
              var countArray = [];
              var urls = [];
  
              var results = engagements1.d.results;                
              for (var i = 0; i &lt; results.length; i++) {
                  if (results[i].Consultant.Title == undefined) {
                      continue;
                  }
                  var found = false;
                  for (var j = 0; j &lt; data.length; j++) {
                      if (data[j].personName == results[i].Consultant.Title &amp;&amp; data[j].statusName == results[i].Engagement_x0020_Status) {
                          data[j].statusCount = data[j].statusCount + 1;
                          found = true;
                      }
                  }
                  if (!found) {                        
                      data.push(new IWSChartBuilder.StatusByPerson(results[i].Consultant.Title, results[i].Engagement_x0020_Status, 1));
  
                  }
              }
  
              //Put data into format for stacked bar chart
              var seriesData = [];
              var xCategories = [];
              var xStatus = [];
              var i, j, cat, stat;
  
              //Get Categories (Person Name)
              for (i = 0; i &lt; data.length; i++) {
                  cat = data[i].personName;
                  if (xCategories.indexOf(cat) === -1) {
                      xCategories[xCategories.length] = cat;
                  }
              }
              //Get Status values
              for (i = 0; i &lt; data.length; i++) {
                  stat = data[i].statusName;
                  if (xStatus.indexOf(stat) === -1) {
                      xStatus[xStatus.length] = stat;
                  }
              }
  
              //Create initial series data with 0 values
              for (i = 0; i &lt; xStatus.length; i++) {
                  var dataArray = [];
                  for (j = 0; j &lt; xCategories.length; j++) {
                      dataArray.push(0);
                  }
                  seriesData.push({ name: xStatus[i], data: dataArray });
            }
  
              //Cycle through data to assign counts to the proper location in the series data
              for (i = 0; i &lt; data.length; i++) {
                  var personIndex = xCategories.indexOf(data[i].personName);
                  for (j = 0; j &lt; seriesData.length; j++) {
                      if(seriesData[j].name == data[i].statusName){
                          seriesData[j].data[personIndex] = data[i].statusCount;                            
                          break;
                      }
                  }
              }
  
              //Build Chart
              IWSChartBuilder.Utilities.loadStackedBarChartWithLink(xCategories, seriesData, "#engagementsByStatusChart", "Engagements by Status", "Total Projects");     
          }
      ).fail(
          function (engagements1) {
              $("#engagementsByStatusChart").html("&lt;strong&gt;An error has occurred.&lt;/strong&gt;");
          }
      );
  };
  
  return {
      load: load
  }
  </code></pre>
  
  <p>}();</p>
  
  <p>The way I am trying now</p>
  
  <pre><code>plotOptions: {
              series: {
                  cursor: 'pointer',
                  stacking: 'normal',
                  point: {
                      events: {
                          click: function () {
                              getURL(this, xCategories, seriesData);
                          }
                      }
                  }
              }
          },
  
  function getURL(chartInfo, xCategories, seriesData) {
  
  var baseUrl = "correctURL" + xCategories[chartInfo._i] + "-FilterField2%3DEngagement%255Fx0020% 255FStatus-FilterValue2%3D" + chartInfo.name;
  location.href = baseUrl;
  </code></pre>
  
  <p>}</p>