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