• 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></style>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <script>
    15. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    16. var myConfig = {
    17. "type": "heatmap",
    18. "title": {
    19. "text": "%y"
    20. },
    21. "plot": {
    22. "tooltip": {
    23. "text": "%kl will be<br>%data-weather<br>in %y!",
    24. "background-color": "white",
    25. "alpha": 0.7,
    26. "font-family": "Georgia",
    27. "font-color": "#006699"
    28. },
    29. "aspect": "none",
    30. "background-color": "none",
    31. "background-repeat": false,
    32. "rules": [{
    33. "rule": "%v == 1",
    34. "background-image": "http://www.zingchart.com/package/examples/images/sunny.png",
    35. "background-fit": "xy"
    36. },
    37. {
    38. "rule": "%v == 2",
    39. "background-image": "http://www.zingchart.com/package/examples/images/partly-cloudy.png",
    40. "background-fit": "xy"
    41. },
    42. {
    43. "rule": "%v == 3",
    44. "background-image": "http://www.zingchart.com/package/examples/images/cloudy.png",
    45. "background-fit": "xy"
    46. }
    47. ],
    48. "hover-state": {
    49. "background-color": "#66CCFF"
    50. }
    51. },
    52. "scale-x": {
    53. "labels": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    54. "line-color": "none",
    55. "guide": {
    56. "line-style": "solid"
    57. },
    58. "tick": {
    59. "visible": false
    60. },
    61. "item": {
    62. "font-size": 10
    63. }
    64. },
    65. "scale-y": {
    66. "labels": ["San Diego", "Orange County", "Los Angeles"],
    67. "line-color": "none",
    68. "guide": {
    69. "line-style": "solid"
    70. },
    71. "tick": {
    72. "visible": false
    73. },
    74. "item": {
    75. "font-size": 10
    76. }
    77. },
    78. "plotarea": {
    79. "margin-left": "dynamic"
    80. },
    81. "series": [{
    82. "values": [1, 3, 1, 2, 3, 2, 3],
    83. "data-weather": ["sunny", "cloudy", "sunny", "partly cloudy", "cloudy", "partly cloudy", "cloudy"]
    84. },
    85. {
    86. "values": [2, 2, 1, 1, 3, 3, 2],
    87. "data-weather": ["partly cloudy", "partly cloudy", "sunny", "sunny", "cloudy", "cloudy", "partly cloudy"]
    88. },
    89. {
    90. "values": [1, 3, 3, 2, 1, 1, 3],
    91. "data-weather": ["sunny", "cloudy", "cloudy", "partly cloudy", "sunny", "sunny", "cloudy"]
    92. }
    93. ]
    94. };
    95.  
    96. zingchart.render({
    97. id: 'myChart',
    98. data: myConfig,
    99. height: 300,
    100. width: "100%"
    101. });
    102. </script>
    103. </body>
    104.  
    105. </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.  
    1. var myConfig = {
    2. "type": "heatmap",
    3. "title": {
    4. "text": "%y"
    5. },
    6. "plot": {
    7. "tooltip": {
    8. "text": "%kl will be<br>%data-weather<br>in %y!",
    9. "background-color": "white",
    10. "alpha": 0.7,
    11. "font-family": "Georgia",
    12. "font-color": "#006699"
    13. },
    14. "aspect": "none",
    15. "background-color": "none",
    16. "background-repeat": false,
    17. "rules": [{
    18. "rule": "%v == 1",
    19. "background-image": "http://www.zingchart.com/package/examples/images/sunny.png",
    20. "background-fit": "xy"
    21. },
    22. {
    23. "rule": "%v == 2",
    24. "background-image": "http://www.zingchart.com/package/examples/images/partly-cloudy.png",
    25. "background-fit": "xy"
    26. },
    27. {
    28. "rule": "%v == 3",
    29. "background-image": "http://www.zingchart.com/package/examples/images/cloudy.png",
    30. "background-fit": "xy"
    31. }
    32. ],
    33. "hover-state": {
    34. "background-color": "#66CCFF"
    35. }
    36. },
    37. "scale-x": {
    38. "labels": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
    39. "line-color": "none",
    40. "guide": {
    41. "line-style": "solid"
    42. },
    43. "tick": {
    44. "visible": false
    45. },
    46. "item": {
    47. "font-size": 10
    48. }
    49. },
    50. "scale-y": {
    51. "labels": ["San Diego", "Orange County", "Los Angeles"],
    52. "line-color": "none",
    53. "guide": {
    54. "line-style": "solid"
    55. },
    56. "tick": {
    57. "visible": false
    58. },
    59. "item": {
    60. "font-size": 10
    61. }
    62. },
    63. "plotarea": {
    64. "margin-left": "dynamic"
    65. },
    66. "series": [{
    67. "values": [1, 3, 1, 2, 3, 2, 3],
    68. "data-weather": ["sunny", "cloudy", "sunny", "partly cloudy", "cloudy", "partly cloudy", "cloudy"]
    69. },
    70. {
    71. "values": [2, 2, 1, 1, 3, 3, 2],
    72. "data-weather": ["partly cloudy", "partly cloudy", "sunny", "sunny", "cloudy", "cloudy", "partly cloudy"]
    73. },
    74. {
    75. "values": [1, 3, 3, 2, 1, 1, 3],
    76. "data-weather": ["sunny", "cloudy", "cloudy", "partly cloudy", "sunny", "sunny", "cloudy"]
    77. }
    78. ]
    79. };
    80.  
    81. zingchart.render({
    82. id: 'myChart',
    83. data: myConfig,
    84. height: 300,
    85. width: "100%"
    86. });