• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style>
    10. html,
    11. body,
    12. #myChart {
    13. height: 100%;
    14. width: 100%;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <div id='myChart'></div>
    21. <script>
    22. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    23. var myConfig = {
    24. "type": "heatmap",
    25. "plot": {
    26. "aspect": "none",
    27. "background-color": "none",
    28. "background-repeat": false,
    29. "rules": [{
    30. "rule": "%v >= 50",
    31. "background-image": "https://www.zingchart.com/resources/sunny.png"
    32. },
    33. {
    34. "rule": "%v < 50 && %v >= 30",
    35. "background-image": "https://www.zingchart.com/resources/partly-cloudy.png"
    36. },
    37. {
    38. "rule": "%v < 30",
    39. "background-image": "https://www.zingchart.com/resources/cloudy.png"
    40. }
    41. ],
    42. "hover-state": {
    43. "background-color": "#66CCFF"
    44. }
    45. },
    46. "scale-x": {
    47. "labels": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    48. "line-color": "none",
    49. "guide": {
    50. "visible": false
    51. },
    52. "tick": {
    53. "visible": false
    54. },
    55. "placement": "opposite"
    56. },
    57. "scale-y": {
    58. "labels": ["SD", "OC", "LA"],
    59. "line-color": "none",
    60. "guide": {
    61. "visible": false
    62. },
    63. "tick": {
    64. "visible": false
    65. }
    66. },
    67. "series": [{
    68. "values": [59, 15, 5, 30, 60, 99, 28]
    69. },
    70. {
    71. "values": [34, 32, 87, 65, 9, 17, 40]
    72. },
    73. {
    74. "values": [90, 19, 50, 39, 12, 49, 14]
    75. }
    76. ]
    77. };
    78.  
    79.  
    80. zingchart.render({
    81. id: 'myChart',
    82. data: myConfig,
    83. height: "100%",
    84. width: "100%"
    85. });
    86. </script>
    87. </body>
    88.  
    89. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id='myChart'></div>
    13. </body>
    14.  
    15. </html>
    1. html,
    2. body,
    3. #myChart {
    4. height: 100%;
    5. width: 100%;
    6. }
    1. var myConfig = {
    2. "type": "heatmap",
    3. "plot": {
    4. "aspect": "none",
    5. "background-color": "none",
    6. "background-repeat": false,
    7. "rules": [{
    8. "rule": "%v >= 50",
    9. "background-image": "https://www.zingchart.com/resources/sunny.png"
    10. },
    11. {
    12. "rule": "%v < 50 && %v >= 30",
    13. "background-image": "https://www.zingchart.com/resources/partly-cloudy.png"
    14. },
    15. {
    16. "rule": "%v < 30",
    17. "background-image": "https://www.zingchart.com/resources/cloudy.png"
    18. }
    19. ],
    20. "hover-state": {
    21. "background-color": "#66CCFF"
    22. }
    23. },
    24. "scale-x": {
    25. "labels": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
    26. "line-color": "none",
    27. "guide": {
    28. "visible": false
    29. },
    30. "tick": {
    31. "visible": false
    32. },
    33. "placement": "opposite"
    34. },
    35. "scale-y": {
    36. "labels": ["SD", "OC", "LA"],
    37. "line-color": "none",
    38. "guide": {
    39. "visible": false
    40. },
    41. "tick": {
    42. "visible": false
    43. }
    44. },
    45. "series": [{
    46. "values": [59, 15, 5, 30, 60, 99, 28]
    47. },
    48. {
    49. "values": [34, 32, 87, 65, 9, 17, 40]
    50. },
    51. {
    52. "values": [90, 19, 50, 39, 12, 49, 14]
    53. }
    54. ]
    55. };
    56.  
    57.  
    58. zingchart.render({
    59. id: 'myChart',
    60. data: myConfig,
    61. height: "100%",
    62. width: "100%"
    63. });