title: AmCharts XY Chart - How to get modal popup on click in Angular?
body: <p>We need to show a modal window show when users click on a data point. </p>
  
  <p>The code we have is:</p>
  
  <pre><code>  constructor(public dataservice: DataserviceService, private modalService: NgbModal, private router: Router) { }
    ...
    ...
    bullet.events.on("hit", function (ev) {
      console.log(ev.target._dataItem.dataContext);
      this.modalService.open(this.dialog);
    });
  }
  
  public showDialog() {
    this.modalService.open(this.dialog);
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/SbOa4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SbOa4.png" alt="enter image description here"></a>
  We are able to see the log data in console.. but not the modal. How can we solve this?</p>