title: Highcharts - How to get the particular chart id on click of custom label in export options
body: <p>I have an Highchart in which I added a custom label('Show label') in export options.I have also added a click event on it.Now my requirement is, on click of that label I need to get the id(here its 'container') of that particular chart.I tried with jquery also but it was not working.Can anyone please help me.Here is the code.</p>
  
  <h2>HTML</h2>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.highcharts.com/highcharts.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.highcharts.com/modules/series-label.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.highcharts.com/modules/exporting.js"&gt;&lt;/script&gt;
  &lt;script src="https://code.highcharts.com/modules/export-data.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt; 
  &lt;div id="container"&gt;&lt;/div&gt;
  </code></pre>
  
  <h2>script</h2>
  
  <pre><code>Highcharts.chart('container', {
  
      title: {
          text: 'Solar Employment Growth by Sector, 2010-2016'
      },
  
      subtitle: {
          text: 'Source: thesolarfoundation.com'
      },
  
      yAxis: {
          title: {
              text: 'Number of Employees'
          }
      },
      legend: {
          layout: 'vertical',
          align: 'right',
          verticalAlign: 'middle'
      },
  
      plotOptions: {
          series: {
              label: {
                  connectorAllowed: false
              },
              pointStart: 2010
          }
      },
  exporting: {
          menuItemDefinitions: {
              // Custom definition
              label: {
                  onclick: function () {
                  func();
  
                      this.renderer.label(
                          'You just clicked a custom menu item',
                          100,
                          100
                      )
  
                  },
                  text: 'Show label'
              }
          },
          buttons: {
              contextButton: {
                  menuItems: ['downloadPNG', 'downloadSVG', 'separator', 'label']
              }
          }
      },
      series: [{
          name: 'Other',
          data: [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
      }],
  
      responsive: {
          rules: [{
              condition: {
                  maxWidth: 500
              },
              chartOptions: {
                  legend: {
                      layout: 'horizontal',
                      align: 'center',
                      verticalAlign: 'bottom'
                  }
              }
          }]
      }
  
  });
  function func(){
  alert('Hello');
  }
  </code></pre>