• Edit
  • Download
  • <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingSoft Demo</title>
      <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
    
      <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
      <style>
        #reload {
          background: #00BAF0;
          border: none;
          border-radius: 4px;
          color: white;
          cursor: pointer;
          font-size: 16px;
          padding: 4px 8px;
        }
      </style>
    </head>
    
    <body>
      <div id='myChart'></div>
      <button id="reload"><i class="fa fa-refresh"></i> Replay Animation</button>
      <script>
        ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
        var myConfig = {
          type: 'bar',
          series: [{
              values: [
                [1, 22],
                [1.25, 34],
                [1.5, 55],
                [1.75, 71]
              ],
              backgroundColor: '#7986CB',
    
              animation: {
                effect: 'ANIMATION_EXPAND_RIGHT',
                speed: 3
              }
            },
            {
              values: [
                [2.75, 42],
                [3, 39],
                [3.25, 50],
                [3.5, 70]
              ],
              backgroundColor: '#4DD0E1',
    
              animation: {
                effect: 'ANIMATION_EXPAND_TOP',
                speed: 3
              }
            },
    
            {
              values: [
                [4.5, 35],
                [4.75, 42],
                [5, 67],
                [5.25, 89]
              ],
              backgroundColor: '#64B5F6',
    
              animation: {
                effect: 'ANIMATION_EXPAND_BOTTOM',
                speed: 3
              }
            },
            {
              values: [
                [6.25, 25],
                [6.5, 34],
                [6.75, 67],
                [7, 85]
              ],
              backgroundColor: '#4DB6AC',
    
              animation: {
                effect: 'ANIMATION_EXPAND_LEFT',
                speed: 3
              }
            }
          ]
        };
    
        zingchart.render({
          id: 'myChart',
          data: myConfig,
          height: 350,
          width: '100%'
        });
    
        var reload = document.querySelector('#reload');
        if (reload) {
          reload.addEventListener('click', function() {
            zingchart.exec('myChart', 'reload');
          });
        }
      </script>
    </body>
    
    </html>
    <!DOCTYPE html>
    <html>
    
    <head>
      <meta charset="utf-8">
      <title>ZingSoft Demo</title>
      <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
    
      <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    </head>
    
    <body>
      <div id='myChart'></div>
      <button id="reload"><i class="fa fa-refresh"></i> Replay Animation</button>
    </body>
    
    </html>
    #reload {
      background: #00BAF0;
      border: none;
      border-radius: 4px;
      color: white;
      cursor: pointer;
      font-size: 16px;
      padding: 4px 8px;
    }
    var myConfig = {
      type: 'bar',
      series: [{
          values: [
            [1, 22],
            [1.25, 34],
            [1.5, 55],
            [1.75, 71]
          ],
          backgroundColor: '#7986CB',
    
          animation: {
            effect: 'ANIMATION_EXPAND_RIGHT',
            speed: 3
          }
        },
        {
          values: [
            [2.75, 42],
            [3, 39],
            [3.25, 50],
            [3.5, 70]
          ],
          backgroundColor: '#4DD0E1',
    
          animation: {
            effect: 'ANIMATION_EXPAND_TOP',
            speed: 3
          }
        },
    
        {
          values: [
            [4.5, 35],
            [4.75, 42],
            [5, 67],
            [5.25, 89]
          ],
          backgroundColor: '#64B5F6',
    
          animation: {
            effect: 'ANIMATION_EXPAND_BOTTOM',
            speed: 3
          }
        },
        {
          values: [
            [6.25, 25],
            [6.5, 34],
            [6.75, 67],
            [7, 85]
          ],
          backgroundColor: '#4DB6AC',
    
          animation: {
            effect: 'ANIMATION_EXPAND_LEFT',
            speed: 3
          }
        }
      ]
    };
    
    zingchart.render({
      id: 'myChart',
      data: myConfig,
      height: 350,
      width: '100%'
    });
    
    var reload = document.querySelector('#reload');
    if (reload) {
      reload.addEventListener('click', function() {
        zingchart.exec('myChart', 'reload');
      });
    }