Search results

Show chart in dialog component

03 Mar 2021 / 2 minutes to read

Using the content property of the dialog component, you can show the chart in dialog pop-up.

To show the chart in dialog component, follow the given steps:

Step 1:

Initialize the dialog and button components, and then create a basic chart and set the visibility of dialog to false when initialize.

By setting the chart id in the content property of dialog component, you can show chart when clicking the button component.

Copied to clipboard
<!DOCTYPE html><html lang="en"><head>
    <title>EJ2 Animation</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="Typescript UI Controls">
    <meta name="author" content="Syncfusion">
    <link href="index.css" rel="stylesheet">
<script src="" type="text/javascript"></script>

    <div id="target">
            <div id="container" align="center"></div>
    <div id="defaultDialog">
               <div id="container2" align="center"></div>
    <button class="e-control e-btn" id="targetButton" role="button" e-ripple="true">Open Dialog</button>

var ele = document.getElementById('container');
if(ele) { = "visible";
<script src="index.js" type="text/javascript"></script>