<!doctype html>
<html class="zc-html">
<head>
  <meta charset="utf-8">
  <title>ZingSoft Demo</title>
  <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
  <style>
    .chart--container {
      height: 100%;
      width: 100%;
      min-height: 530px;
    }
    .zc-ref {
      display: none;
    }
  </style>
</head>
<body class="zc-body">
  
  <div id="myChart" class="chart--container">
    <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
  </div>
  <script>
    ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window:load 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
      zingchart.MODULESDIR = 'https://cdn.zingchart.com/modules/';
      // full ZingChart schema can be found here:
      // https://www.zingchart.com/docs/api/json-configuration/
      let chartConfig = {
        type: 'radar',
        heatmap: {
          graph: {
            keyScale: 'scale-k',
            valScale: 'scale-v',
          },
          brushType: 'circle',
          composite: true,
          size: 10,
          blur: 20,
          alpha: 1,
          tooltip: {
            decimals: 1,
          },
          async: false,
        },
        plot: {
          tooltip: {},
        },
        plotarea: {
          margin: 10,
        },
        scale: {
          sizeFactor: 0.9,
        },
        scaleV: {
          values: '0:100:25',
          offsetStart: 40,
          offsetEnd: 0,
        },
        scaleK: {
          values: '0:355:5',
          aspect: 'circle',
          maxItems: 12,
          offset: 0,
        },
        series: [{}],
      };
      let MAX = 100;
      let aData = [];
      zingchart.bind('myChart', 'load', function() {
        window.setInterval(function() {
          let l, k, v;
          let iMaxPoints = 512;
          if (aData.length === 0) {
            for (l = 0; l < iMaxPoints; l++) {
              k = 5 * Math.round(ZC._r_(0, 355) / 5);
              v = 5 * Math.round(ZC._r_(10, 100) / 5);
              aData.push([k, v, MAX * Math.random()]);
            }
          } else {
            for (l = aData.length - 1; l >= 0; l--) {
              aData[l][2] = Math.min(
                MAX,
                aData[l][2] - MAX / 19 + (MAX / 20) * Math.random()
              );
              if (aData[l][2] <= 0) {
                aData.splice(l, 1);
              }
            }
            for (l = 0; l < iMaxPoints - aData.length; l++) {
              k = 5 * Math.round(ZC._r_(0, 355) / 5);
              v = 5 * Math.round(ZC._r_(10, 100) / 5);
              aData.push([k, v, MAX * Math.random()]);
            }
          }
          zingchart.exec('myChart', 'heatmap.setdata', {
            data: aData,
          });
        }, 15);
      });
      zingchart.loadModules('heatmap', function() {
        zingchart.render({
          id: 'myChart',
          width: '100%',
          height: '100%',
          output: 'svg',
          data: chartConfig,
          modules: 'heatmap,color-scale',
        });
      });
    });
  </script>
</body>
</html>
               
              
              
                // window:load 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
  zingchart.MODULESDIR = 'https://cdn.zingchart.com/modules/';
  // full ZingChart schema can be found here:
  // https://www.zingchart.com/docs/api/json-configuration/
  let chartConfig = {
    type: 'radar',
    heatmap: {
      graph: {
        keyScale: 'scale-k',
        valScale: 'scale-v',
      },
      brushType: 'circle',
      composite: true,
      size: 10,
      blur: 20,
      alpha: 1,
      tooltip: {
        decimals: 1,
      },
      async: false,
    },
    plot: {
      tooltip: {},
    },
    plotarea: {
      margin: 10,
    },
    scale: {
      sizeFactor: 0.9,
    },
    scaleV: {
      values: '0:100:25',
      offsetStart: 40,
      offsetEnd: 0,
    },
    scaleK: {
      values: '0:355:5',
      aspect: 'circle',
      maxItems: 12,
      offset: 0,
    },
    series: [{}],
  };
  let MAX = 100;
  let aData = [];
  zingchart.bind('myChart', 'load', function () {
    window.setInterval(function () {
      let l, k, v;
      let iMaxPoints = 512;
      if (aData.length === 0) {
        for (l = 0; l < iMaxPoints; l++) {
          k = 5 * Math.round(ZC._r_(0, 355) / 5);
          v = 5 * Math.round(ZC._r_(10, 100) / 5);
          aData.push([k, v, MAX * Math.random()]);
        }
      } else {
        for (l = aData.length - 1; l >= 0; l--) {
          aData[l][2] = Math.min(
            MAX,
            aData[l][2] - MAX / 19 + (MAX / 20) * Math.random()
          );
          if (aData[l][2] <= 0) {
            aData.splice(l, 1);
          }
        }
        for (l = 0; l < iMaxPoints - aData.length; l++) {
          k = 5 * Math.round(ZC._r_(0, 355) / 5);
          v = 5 * Math.round(ZC._r_(10, 100) / 5);
          aData.push([k, v, MAX * Math.random()]);
        }
      }
      zingchart.exec('myChart', 'heatmap.setdata', {
        data: aData,
      });
    }, 15);
  });
  zingchart.loadModules('heatmap', function () {
    zingchart.render({
      id: 'myChart',
      width: '100%',
      height: '100%',
      output: 'svg',
      data: chartConfig,
      modules: 'heatmap,color-scale',
    });
  });
});