Highcharts - How to get the particular chart id on click of custom label in export options










0















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.



HTML



<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
</head>
<body>
<div id="container"></div>


script



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');










share|improve this question






















  • Do you want the id of Show Label element

    – front_end_dev
    Nov 13 '18 at 17:38











  • No Chart id , in this case chart id is 'container'

    – carreankush
    Nov 13 '18 at 17:41











  • Provided an answer.

    – front_end_dev
    Nov 13 '18 at 17:45















0















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.



HTML



<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
</head>
<body>
<div id="container"></div>


script



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');










share|improve this question






















  • Do you want the id of Show Label element

    – front_end_dev
    Nov 13 '18 at 17:38











  • No Chart id , in this case chart id is 'container'

    – carreankush
    Nov 13 '18 at 17:41











  • Provided an answer.

    – front_end_dev
    Nov 13 '18 at 17:45













0












0








0


1






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.



HTML



<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
</head>
<body>
<div id="container"></div>


script



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');










share|improve this question














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.



HTML



<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/series-label.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="https://code.highcharts.com/modules/export-data.js"></script>
</head>
<body>
<div id="container"></div>


script



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');







javascript html highcharts






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 13 '18 at 17:20









carreankushcarreankush

1607




1607












  • Do you want the id of Show Label element

    – front_end_dev
    Nov 13 '18 at 17:38











  • No Chart id , in this case chart id is 'container'

    – carreankush
    Nov 13 '18 at 17:41











  • Provided an answer.

    – front_end_dev
    Nov 13 '18 at 17:45

















  • Do you want the id of Show Label element

    – front_end_dev
    Nov 13 '18 at 17:38











  • No Chart id , in this case chart id is 'container'

    – carreankush
    Nov 13 '18 at 17:41











  • Provided an answer.

    – front_end_dev
    Nov 13 '18 at 17:45
















Do you want the id of Show Label element

– front_end_dev
Nov 13 '18 at 17:38





Do you want the id of Show Label element

– front_end_dev
Nov 13 '18 at 17:38













No Chart id , in this case chart id is 'container'

– carreankush
Nov 13 '18 at 17:41





No Chart id , in this case chart id is 'container'

– carreankush
Nov 13 '18 at 17:41













Provided an answer.

– front_end_dev
Nov 13 '18 at 17:45





Provided an answer.

– front_end_dev
Nov 13 '18 at 17:45












2 Answers
2






active

oldest

votes


















0














You can pass the event and context this into the label click function handler.



 label: 
onclick: function (event)
func(event,this);
this.renderer.label(
'You just clicked a custom menu item',
100,
100
)

,
text: 'Show label'



function func(event,context)
console.log("chart id => ",context.renderTo.getAttribute('id'));



Updated 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 (event)
func(event,this);

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(event,context)
console.log("chart id => ",context.renderTo.getAttribute('id'));



Working jsFiddle demo - https://jsfiddle.net/sc0Lg4uh/1/



Check console.log for id of the container.






share|improve this answer
































    1














    You can access the id of the rendered HTML element using the renderTo method provided by Highchart. Your exporting section should be:



    exporting: 
    menuItemDefinitions:
    // Custom definition
    label:
    onclick: function ()
    chartId = this.renderTo.id
    alert(chartId)
    this.renderer.label(
    'You just clicked a custom menu item',
    100,
    100
    )

    ,
    text: 'Show label'

    ,
    buttons:
    contextButton:
    menuItems: ['downloadPNG', 'downloadSVG', 'separator', 'label']





    Documentation



    https://api.highcharts.com/highcharts/chart.renderTo






    share|improve this answer

























    • I am getting this error Uncaught TypeError: Cannot read property 'id' of undefined at func (2.html:88) at a.Chart.onclick (2.html:48) at HTMLDivElement.onclick (exporting.src.js:1364)

      – carreankush
      Nov 13 '18 at 18:12











    • Please check the edited answer

      – kailashdesiti
      Nov 13 '18 at 18:45










    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286408%2fhighcharts-how-to-get-the-particular-chart-id-on-click-of-custom-label-in-expo%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You can pass the event and context this into the label click function handler.



     label: 
    onclick: function (event)
    func(event,this);
    this.renderer.label(
    'You just clicked a custom menu item',
    100,
    100
    )

    ,
    text: 'Show label'



    function func(event,context)
    console.log("chart id => ",context.renderTo.getAttribute('id'));



    Updated 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 (event)
    func(event,this);

    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(event,context)
    console.log("chart id => ",context.renderTo.getAttribute('id'));



    Working jsFiddle demo - https://jsfiddle.net/sc0Lg4uh/1/



    Check console.log for id of the container.






    share|improve this answer





























      0














      You can pass the event and context this into the label click function handler.



       label: 
      onclick: function (event)
      func(event,this);
      this.renderer.label(
      'You just clicked a custom menu item',
      100,
      100
      )

      ,
      text: 'Show label'



      function func(event,context)
      console.log("chart id => ",context.renderTo.getAttribute('id'));



      Updated 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 (event)
      func(event,this);

      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(event,context)
      console.log("chart id => ",context.renderTo.getAttribute('id'));



      Working jsFiddle demo - https://jsfiddle.net/sc0Lg4uh/1/



      Check console.log for id of the container.






      share|improve this answer



























        0












        0








        0







        You can pass the event and context this into the label click function handler.



         label: 
        onclick: function (event)
        func(event,this);
        this.renderer.label(
        'You just clicked a custom menu item',
        100,
        100
        )

        ,
        text: 'Show label'



        function func(event,context)
        console.log("chart id => ",context.renderTo.getAttribute('id'));



        Updated 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 (event)
        func(event,this);

        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(event,context)
        console.log("chart id => ",context.renderTo.getAttribute('id'));



        Working jsFiddle demo - https://jsfiddle.net/sc0Lg4uh/1/



        Check console.log for id of the container.






        share|improve this answer















        You can pass the event and context this into the label click function handler.



         label: 
        onclick: function (event)
        func(event,this);
        this.renderer.label(
        'You just clicked a custom menu item',
        100,
        100
        )

        ,
        text: 'Show label'



        function func(event,context)
        console.log("chart id => ",context.renderTo.getAttribute('id'));



        Updated 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 (event)
        func(event,this);

        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(event,context)
        console.log("chart id => ",context.renderTo.getAttribute('id'));



        Working jsFiddle demo - https://jsfiddle.net/sc0Lg4uh/1/



        Check console.log for id of the container.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Nov 14 '18 at 4:40

























        answered Nov 13 '18 at 17:45









        front_end_devfront_end_dev

        1,3351511




        1,3351511























            1














            You can access the id of the rendered HTML element using the renderTo method provided by Highchart. Your exporting section should be:



            exporting: 
            menuItemDefinitions:
            // Custom definition
            label:
            onclick: function ()
            chartId = this.renderTo.id
            alert(chartId)
            this.renderer.label(
            'You just clicked a custom menu item',
            100,
            100
            )

            ,
            text: 'Show label'

            ,
            buttons:
            contextButton:
            menuItems: ['downloadPNG', 'downloadSVG', 'separator', 'label']





            Documentation



            https://api.highcharts.com/highcharts/chart.renderTo






            share|improve this answer

























            • I am getting this error Uncaught TypeError: Cannot read property 'id' of undefined at func (2.html:88) at a.Chart.onclick (2.html:48) at HTMLDivElement.onclick (exporting.src.js:1364)

              – carreankush
              Nov 13 '18 at 18:12











            • Please check the edited answer

              – kailashdesiti
              Nov 13 '18 at 18:45















            1














            You can access the id of the rendered HTML element using the renderTo method provided by Highchart. Your exporting section should be:



            exporting: 
            menuItemDefinitions:
            // Custom definition
            label:
            onclick: function ()
            chartId = this.renderTo.id
            alert(chartId)
            this.renderer.label(
            'You just clicked a custom menu item',
            100,
            100
            )

            ,
            text: 'Show label'

            ,
            buttons:
            contextButton:
            menuItems: ['downloadPNG', 'downloadSVG', 'separator', 'label']





            Documentation



            https://api.highcharts.com/highcharts/chart.renderTo






            share|improve this answer

























            • I am getting this error Uncaught TypeError: Cannot read property 'id' of undefined at func (2.html:88) at a.Chart.onclick (2.html:48) at HTMLDivElement.onclick (exporting.src.js:1364)

              – carreankush
              Nov 13 '18 at 18:12











            • Please check the edited answer

              – kailashdesiti
              Nov 13 '18 at 18:45













            1












            1








            1







            You can access the id of the rendered HTML element using the renderTo method provided by Highchart. Your exporting section should be:



            exporting: 
            menuItemDefinitions:
            // Custom definition
            label:
            onclick: function ()
            chartId = this.renderTo.id
            alert(chartId)
            this.renderer.label(
            'You just clicked a custom menu item',
            100,
            100
            )

            ,
            text: 'Show label'

            ,
            buttons:
            contextButton:
            menuItems: ['downloadPNG', 'downloadSVG', 'separator', 'label']





            Documentation



            https://api.highcharts.com/highcharts/chart.renderTo






            share|improve this answer















            You can access the id of the rendered HTML element using the renderTo method provided by Highchart. Your exporting section should be:



            exporting: 
            menuItemDefinitions:
            // Custom definition
            label:
            onclick: function ()
            chartId = this.renderTo.id
            alert(chartId)
            this.renderer.label(
            'You just clicked a custom menu item',
            100,
            100
            )

            ,
            text: 'Show label'

            ,
            buttons:
            contextButton:
            menuItems: ['downloadPNG', 'downloadSVG', 'separator', 'label']





            Documentation



            https://api.highcharts.com/highcharts/chart.renderTo







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Dec 8 '18 at 4:51









            AnonymousSB

            2,184221




            2,184221










            answered Nov 13 '18 at 17:53









            kailashdesitikailashdesiti

            1113




            1113












            • I am getting this error Uncaught TypeError: Cannot read property 'id' of undefined at func (2.html:88) at a.Chart.onclick (2.html:48) at HTMLDivElement.onclick (exporting.src.js:1364)

              – carreankush
              Nov 13 '18 at 18:12











            • Please check the edited answer

              – kailashdesiti
              Nov 13 '18 at 18:45

















            • I am getting this error Uncaught TypeError: Cannot read property 'id' of undefined at func (2.html:88) at a.Chart.onclick (2.html:48) at HTMLDivElement.onclick (exporting.src.js:1364)

              – carreankush
              Nov 13 '18 at 18:12











            • Please check the edited answer

              – kailashdesiti
              Nov 13 '18 at 18:45
















            I am getting this error Uncaught TypeError: Cannot read property 'id' of undefined at func (2.html:88) at a.Chart.onclick (2.html:48) at HTMLDivElement.onclick (exporting.src.js:1364)

            – carreankush
            Nov 13 '18 at 18:12





            I am getting this error Uncaught TypeError: Cannot read property 'id' of undefined at func (2.html:88) at a.Chart.onclick (2.html:48) at HTMLDivElement.onclick (exporting.src.js:1364)

            – carreankush
            Nov 13 '18 at 18:12













            Please check the edited answer

            – kailashdesiti
            Nov 13 '18 at 18:45





            Please check the edited answer

            – kailashdesiti
            Nov 13 '18 at 18:45

















            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53286408%2fhighcharts-how-to-get-the-particular-chart-id-on-click-of-custom-label-in-expo%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            這個網誌中的熱門文章

            How to read a connectionString WITH PROVIDER in .NET Core?

            In R, how to develop a multiplot heatmap.2 figure showing key labels successfully

            Museum of Modern and Contemporary Art of Trento and Rovereto