How to create popup modal in magento 2?

How to create Popup Modal using Javascript in Magento 2?

Create a .phtml template file with the given content to make POPUP using Magento 2,

In the above template file, we can show popup based on click on chart link. When click on the chart link defined in our DOM element popup modal will be displayed.

Call Magento_Ui/js/modal/modal object in your require dependency.

There are many default options are available for modal.js file.
Different types of optios you can pass as per your requirement in above options object.

List of default options for a modal popup, if you want to override default value set options value in your custom template in the options object.