• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <script nonce="undefined">
    9. zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";
    10. </script>
    11.  
    12. <script nonce="undefined" src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous">
    13. </script>
    14.  
    15. <style>
    16. body {
    17. margin: 10px;
    18. padding: 10px;
    19. }
    20.  
    21. *,
    22. input,
    23. button,
    24. select,
    25. textarea,
    26. label {
    27. font-family: 'Lucida Sans Unicode', Monaco, Tahoma, Verdana, Arial;
    28. }
    29. </style>
    30. </head>
    31.  
    32. <body>
    33. <div id="zc"></div>
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    36. var cdata = {
    37. type: 'radar',
    38. heatmap: {},
    39. plotarea: {
    40. margin: 10
    41. },
    42. scale: {
    43. sizeFactor: 0.9
    44. },
    45. scaleV: {
    46. offsetStart: 40,
    47. offsetEnd: 0,
    48. values: '0:100:25'
    49. },
    50. scaleK: {
    51. aspect: 'circle',
    52. values: '0:355:5',
    53. maxItems: 12
    54. },
    55. tooltip: {},
    56. plot: {},
    57. series: [{}]
    58. };
    59.  
    60. var MAX = 100;
    61. var aData = [];
    62. zingchart.bind('zc', 'load', function() {
    63. var l, k, v;
    64. var iMaxPoints = 512;
    65. for (l = 0; l < iMaxPoints; l++) {
    66. k = 5 * Math.round(((iMaxPoints - l) % 300) / 5) + 350;
    67. v = 5 * Math.round((l % 100) / 5) + 250;
    68. aData.push([k, v, MAX]);
    69. }
    70. zingchart.exec('zc', 'heatmap.setdata', {
    71. data: aData
    72. });
    73. });
    74.  
    75. zingchart.loadModules('heatmap', function() {
    76. zingchart.render({
    77. id: 'zc',
    78. width: '100%',
    79. height: 500,
    80. output: 'svg',
    81. data: cdata,
    82. modules: 'heatmap,color-scale'
    83. });
    84. });
    85. </script>
    86. </body>
    87.  
    88. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <script>
    9. zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";
    10. </script>
    11.  
    12. <script src="https://code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous">
    13. </script>
    14.  
    15. </head>
    16.  
    17. <body>
    18. <div id="zc"></div>
    19. </body>
    20.  
    21. </html>
    1. body {
    2. margin: 10px;
    3. padding: 10px;
    4. }
    5.  
    6. *,
    7. input,
    8. button,
    9. select,
    10. textarea,
    11. label {
    12. font-family: 'Lucida Sans Unicode', Monaco, Tahoma, Verdana, Arial;
    13. }
    1. var cdata = {
    2. type: 'radar',
    3. heatmap: {},
    4. plotarea: {
    5. margin: 10
    6. },
    7. scale: {
    8. sizeFactor: 0.9
    9. },
    10. scaleV: {
    11. offsetStart: 40,
    12. offsetEnd: 0,
    13. values: '0:100:25'
    14. },
    15. scaleK: {
    16. aspect: 'circle',
    17. values: '0:355:5',
    18. maxItems: 12
    19. },
    20. tooltip: {},
    21. plot: {},
    22. series: [{}]
    23. };
    24.  
    25. var MAX = 100;
    26. var aData = [];
    27. zingchart.bind('zc', 'load', function() {
    28. var l, k, v;
    29. var iMaxPoints = 512;
    30. for (l = 0; l < iMaxPoints; l++) {
    31. k = 5 * Math.round(((iMaxPoints - l) % 300) / 5) + 350;
    32. v = 5 * Math.round((l % 100) / 5) + 250;
    33. aData.push([k, v, MAX]);
    34. }
    35. zingchart.exec('zc', 'heatmap.setdata', {
    36. data: aData
    37. });
    38. });
    39.  
    40. zingchart.loadModules('heatmap', function() {
    41. zingchart.render({
    42. id: 'zc',
    43. width: '100%',
    44. height: 500,
    45. output: 'svg',
    46. data: cdata,
    47. modules: 'heatmap,color-scale'
    48. });
    49. });