• 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. .zc-html,
    11. .zc-body {
    12. margin: 0;
    13. padding: 0;
    14. width: 100%;
    15. height: 100%;
    16. }
    17.  
    18. .chart--container {
    19. height: 100%;
    20. width: 100%;
    21. min-height: 530px;
    22. }
    23.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <div id='myChart'></div>
    32. <div id='myChart2'></div>
    33. <script>
    34. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    35. let chartConfig = {
    36. type: 'treemap',
    37. title: {
    38. text: 'Progression: "lin" (default)'
    39. },
    40. plotarea: {
    41. margin: '50px 0 30px 0'
    42. },
    43. tooltip: {},
    44. options: {},
    45. series: [{
    46. text: 'North America',
    47. children: [{
    48. text: 'United States',
    49. children: [{
    50. text: 'Texas',
    51. value: 21
    52. },
    53. {
    54. text: 'California',
    55. value: 53
    56. },
    57. {
    58. text: 'Ohio',
    59. value: 12
    60. },
    61. {
    62. text: 'New York',
    63. value: 46
    64. },
    65. {
    66. text: 'Michigan',
    67. value: 39
    68. },
    69. {
    70. text: 'Alabama',
    71. value: 25
    72. }
    73. ]
    74. },
    75. {
    76. text: 'Canada',
    77. value: 113
    78. },
    79. {
    80. text: 'Mexico',
    81. value: 78
    82. }
    83. ]
    84. },
    85. {
    86. text: 'Europe',
    87. children: [{
    88. text: 'France',
    89. value: 42
    90. },
    91. {
    92. text: 'Spain',
    93. value: 28
    94. },
    95. {
    96. text: 'Switzerland',
    97. value: 13
    98. },
    99. {
    100. text: 'Germany',
    101. value: 56
    102. },
    103. {
    104. text: 'Cyprus',
    105. value: 7
    106. }
    107. ]
    108. },
    109. {
    110. text: 'Africa',
    111. children: [{
    112. text: 'Egypt',
    113. value: 22
    114. },
    115. {
    116. text: 'Congo',
    117. value: 38
    118. },
    119. {
    120. text: 'Lesotho',
    121. value: 9
    122. }
    123. ]
    124. },
    125. {
    126. text: 'Asia',
    127. children: [{
    128. text: 'India',
    129. value: 92
    130. },
    131. {
    132. text: 'China',
    133. value: 68
    134. },
    135. {
    136. text: 'Mongolia',
    137. value: 25
    138. }
    139. ]
    140. },
    141. {
    142. text: 'South America',
    143. children: [{
    144. text: 'Brazil',
    145. value: 42
    146. },
    147. {
    148. text: 'Argentina',
    149. value: 28
    150. },
    151. {
    152. text: 'Peru',
    153. value: 15
    154. },
    155. {
    156. text: 'Uruguay',
    157. value: 33
    158. }
    159. ]
    160. },
    161. {
    162. text: 'Australia (continent)',
    163. children: [{
    164. text: 'Australia (country)',
    165. value: 121
    166. },
    167. {
    168. text: 'New Zealand',
    169. value: 24
    170. }
    171. ]
    172. }
    173. ]
    174. };
    175.  
    176. zingchart.render({
    177. id: 'myChart',
    178. data: chartConfig,
    179. height: '44%',
    180. width: '100%'
    181. });
    182.  
    183. chartConfig.title.text = 'Progression: "log"';
    184. chartConfig.options.progression = 'log';
    185.  
    186. zingchart.render({
    187. id: 'myChart2',
    188. data: chartConfig,
    189. height: '45%',
    190. width: '100%'
    191. });
    192. </script>
    193. </body>
    194.  
    195. </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. <div id='myChart2'></div>
    14. </body>
    15.  
    16. </html>
    1. .zc-html,
    2. .zc-body {
    3. margin: 0;
    4. padding: 0;
    5. width: 100%;
    6. height: 100%;
    7. }
    8.  
    9. .chart--container {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 530px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. let chartConfig = {
    2. type: 'treemap',
    3. title: {
    4. text: 'Progression: "lin" (default)'
    5. },
    6. plotarea: {
    7. margin: '50px 0 30px 0'
    8. },
    9. tooltip: {},
    10. options: {},
    11. series: [{
    12. text: 'North America',
    13. children: [{
    14. text: 'United States',
    15. children: [{
    16. text: 'Texas',
    17. value: 21
    18. },
    19. {
    20. text: 'California',
    21. value: 53
    22. },
    23. {
    24. text: 'Ohio',
    25. value: 12
    26. },
    27. {
    28. text: 'New York',
    29. value: 46
    30. },
    31. {
    32. text: 'Michigan',
    33. value: 39
    34. },
    35. {
    36. text: 'Alabama',
    37. value: 25
    38. }
    39. ]
    40. },
    41. {
    42. text: 'Canada',
    43. value: 113
    44. },
    45. {
    46. text: 'Mexico',
    47. value: 78
    48. }
    49. ]
    50. },
    51. {
    52. text: 'Europe',
    53. children: [{
    54. text: 'France',
    55. value: 42
    56. },
    57. {
    58. text: 'Spain',
    59. value: 28
    60. },
    61. {
    62. text: 'Switzerland',
    63. value: 13
    64. },
    65. {
    66. text: 'Germany',
    67. value: 56
    68. },
    69. {
    70. text: 'Cyprus',
    71. value: 7
    72. }
    73. ]
    74. },
    75. {
    76. text: 'Africa',
    77. children: [{
    78. text: 'Egypt',
    79. value: 22
    80. },
    81. {
    82. text: 'Congo',
    83. value: 38
    84. },
    85. {
    86. text: 'Lesotho',
    87. value: 9
    88. }
    89. ]
    90. },
    91. {
    92. text: 'Asia',
    93. children: [{
    94. text: 'India',
    95. value: 92
    96. },
    97. {
    98. text: 'China',
    99. value: 68
    100. },
    101. {
    102. text: 'Mongolia',
    103. value: 25
    104. }
    105. ]
    106. },
    107. {
    108. text: 'South America',
    109. children: [{
    110. text: 'Brazil',
    111. value: 42
    112. },
    113. {
    114. text: 'Argentina',
    115. value: 28
    116. },
    117. {
    118. text: 'Peru',
    119. value: 15
    120. },
    121. {
    122. text: 'Uruguay',
    123. value: 33
    124. }
    125. ]
    126. },
    127. {
    128. text: 'Australia (continent)',
    129. children: [{
    130. text: 'Australia (country)',
    131. value: 121
    132. },
    133. {
    134. text: 'New Zealand',
    135. value: 24
    136. }
    137. ]
    138. }
    139. ]
    140. };
    141.  
    142. zingchart.render({
    143. id: 'myChart',
    144. data: chartConfig,
    145. height: '44%',
    146. width: '100%'
    147. });
    148.  
    149. chartConfig.title.text = 'Progression: "log"';
    150. chartConfig.options.progression = 'log';
    151.  
    152. zingchart.render({
    153. id: 'myChart2',
    154. data: chartConfig,
    155. height: '45%',
    156. width: '100%'
    157. });