• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
        <meta charset="utf-8">
        <title>ZingSoft Demo</title>
    
        <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
        <style>
            html,
            body {
                height: 100%;
                width: 100%;
                margin: 0;
                padding: 0;
                background-color: #fff;
            }
    
            #myChart {
                height: 100%;
                width: 100%;
                min-height: 150px;
            }
    
            .zc-ref {
                display: none;
            }
    
            button {
                padding: 10px;
                margin: 10px;
            }
    
            zing-grid[loading] {
                height: 500px;
            }
        </style>
    </head>
    
    <body>
        <button onClick="toggleChartType();">Toggle Chart Type</button>
        <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
        <script>
            ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
            zingchart.loadModules('toolbar3d');
    
            var currentChartType = 'bar3d';
    
            function toggleChartType() {
                if (currentChartType === 'bar3d') currentChartType = 'area3d';
                else if (currentChartType === 'area3d') currentChartType = 'line3d';
                else currentChartType = 'bar3d';
    
                // use api to preserve zoom and set chart type
                zingchart.exec('myChart', 'setcharttype', {
                    type: currentChartType,
                    'preserve-state': true
                });
            }
    
            // window.onload event for Javascript to run after HTML
            // because this Javascript is injected into the document head
            window.addEventListener('load', () => {
                // Javascript code to execute after DOM content
    
                var myConfig = {
                    type: 'bar3d',
                    "3d-aspect": {
                        "x-angle": 0,
                        "y-angle": 0,
                        "z-angle": 10,
                        'true3d': true // set to false to affect depth
                    },
                    series: [{
                        values: [35, 42, 67, 89, 25, 34, 67, 85]
                    }]
                };
    
                zingchart.render({
                    id: 'myChart',
                    data: myConfig,
                    height: '500',
                    width: '725',
                    modules: 'toolbar3d'
                });
            });
        </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    	<head>
        <meta charset="utf-8">
        <title>ZingSoft Demo</title>
    	
    		<script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    </head>
    	<body>
        <button onClick="toggleChartType();">Toggle Chart Type</button>
    		<div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    	</body>
    </html>
    html, body {
    	height:100%;
    	width:100%;
    	margin:0;
    	padding:0;
      background-color: #fff;
    }
    #myChart {
    	height:100%;
    	width:100%;
    	min-height:150px;
    }
    .zc-ref {
    	display:none;
    }
    button { padding:10px; margin:10px; }
    zingchart.loadModules('toolbar3d');
    
    var currentChartType = 'bar3d';
    function toggleChartType() {
      if (currentChartType === 'bar3d') currentChartType = 'area3d';
      else if (currentChartType === 'area3d') currentChartType = 'line3d';
      else currentChartType = 'bar3d';
      
      // use api to preserve zoom and set chart type
      zingchart.exec('myChart', 'setcharttype', {
        type: currentChartType,
        'preserve-state': true
      });
    }
    
    // window.onload event for Javascript to run after HTML
    // because this Javascript is injected into the document head
    window.addEventListener('load', () => {
      // Javascript code to execute after DOM content
    
      var myConfig = {
        type: 'bar3d', 
        "3d-aspect":{
          "x-angle": 0,
          "y-angle": 0,
          "z-angle": 10,
          'true3d': true // set to false to affect depth
        },
        series: [
          {
            values: [35,42,67,89,25,34,67,85]
          }
        ]
      };
    
      zingchart.render({ 
        id: 'myChart', 
        data: myConfig, 
        height: '500', 
        width: '725',
        modules: 'toolbar3d'
      });
    });