• 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. graph: {
    40. keyScale: 'scale-k',
    41. valScale: 'scale-v'
    42. }
    43. },
    44. plotarea: {
    45. margin: 10
    46. },
    47. scale: {
    48. sizeFactor: 0.9
    49. },
    50. scaleV: {
    51. offsetStart: 40,
    52. offsetEnd: 0,
    53. values: '0:100:25'
    54. },
    55. scaleK: {
    56. aspect: 'circle',
    57. values: '0:355:5',
    58. maxItems: 12
    59. },
    60. tooltip: {},
    61. plot: {},
    62. series: [{}]
    63. };
    64.  
    65. var MAX = 100;
    66. var aData = [];
    67. zingchart.bind('zc', 'load', function() {
    68. var l, k, v;
    69. var iMaxPoints = 512;
    70. for (l = 0; l < iMaxPoints; l++) {
    71. k = 5 * Math.round(((iMaxPoints - l) % 355) / 5);
    72. v = 5 * Math.round((l % 100) / 5);
    73. aData.push([k, v, MAX]);
    74. }
    75. zingchart.exec('zc', 'heatmap.setdata', {
    76. data: aData
    77. });
    78. });
    79.  
    80. zingchart.loadModules('heatmap', function() {
    81. zingchart.render({
    82. id: 'zc',
    83. width: 500,
    84. height: 500,
    85. output: 'svg',
    86. data: cdata,
    87. modules: 'heatmap,color-scale'
    88. });
    89. });
    90. </script>
    91. </body>
    92.  
    93. </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. graph: {
    5. keyScale: 'scale-k',
    6. valScale: 'scale-v'
    7. }
    8. },
    9. plotarea: {
    10. margin: 10
    11. },
    12. scale: {
    13. sizeFactor: 0.9
    14. },
    15. scaleV: {
    16. offsetStart: 40,
    17. offsetEnd: 0,
    18. values: '0:100:25'
    19. },
    20. scaleK: {
    21. aspect: 'circle',
    22. values: '0:355:5',
    23. maxItems: 12
    24. },
    25. tooltip: {},
    26. plot: {},
    27. series: [{}]
    28. };
    29.  
    30. var MAX = 100;
    31. var aData = [];
    32. zingchart.bind('zc', 'load', function() {
    33. var l, k, v;
    34. var iMaxPoints = 512;
    35. for (l = 0; l < iMaxPoints; l++) {
    36. k = 5 * Math.round(((iMaxPoints - l) % 355) / 5);
    37. v = 5 * Math.round((l % 100) / 5);
    38. aData.push([k, v, MAX]);
    39. }
    40. zingchart.exec('zc', 'heatmap.setdata', {
    41. data: aData
    42. });
    43. });
    44.  
    45. zingchart.loadModules('heatmap', function() {
    46. zingchart.render({
    47. id: 'zc',
    48. width: 500,
    49. height: 500,
    50. output: 'svg',
    51. data: cdata,
    52. modules: 'heatmap,color-scale'
    53. });
    54. });