Search code examples
javascripthtmljqueryhighchartsorgchart

Onclick of a org chart another org chart will open as a modal popup


I'm working on a Hichcharts project where my requirement is i need to show a modal popup onclick of a org chart's node. And the popup should be another org chart. here's is my code

[enter link description here][1]


  [1]: https://jsfiddle.net/ritzlucky13/p83khLrw/

Can anyone please guide me how to do that?


Solution

  • You can create another organization chart in a popup. Example:

    point: {
      events: {
        click: function() {
          ...
          Highcharts.chart(popupContent, {
            ...
            series: [{
              type: 'organization',
              data: [
                ['CEO', 'Department1'],
                ['CEO', 'Department2'],
                ['CEO', 'Department3']
              ]
            }]
          });
          ...
        }
      }
    }
    

    Live demo: https://jsfiddle.net/BlackLabel/mo32e6v1/