• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <link href="https://fonts.googleapis.com/css?family=Nothing+You+Could+Do" rel="stylesheet">
    9.  
    10. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    11. <style></style>
    12. </head>
    13.  
    14. <body>
    15. <div id="myChart"></div>
    16. <script>
    17. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    18. var myConfig = {
    19. type: 'wordcloud',
    20. options: {
    21. words: [{
    22. text: 'Flowers',
    23. count: 100
    24. },
    25. {
    26. text: 'Alstroemeria',
    27. count: 5
    28. },
    29. {
    30. text: 'Bearded Iris',
    31. count: 15
    32. },
    33. {
    34. text: 'Chrysanthemum',
    35. count: 10
    36. },
    37. {
    38. text: 'Calla Lily',
    39. count: 20
    40. },
    41. {
    42. text: 'Daffodil',
    43. count: 15
    44. },
    45. {
    46. text: 'Freesia',
    47. count: 40
    48. },
    49. {
    50. text: 'Garden Party Lily',
    51. count: 5
    52. },
    53. {
    54. text: 'Gladiolus',
    55. count: 5
    56. },
    57. {
    58. text: 'Peony',
    59. count: 10
    60. },
    61. {
    62. text: 'Ranunculus',
    63. count: 5
    64. },
    65. {
    66. text: 'Rose',
    67. count: 25
    68. },
    69. {
    70. text: 'Stargazer Lily',
    71. count: 30
    72. },
    73. {
    74. text: 'Torch Lily',
    75. count: 10
    76. },
    77. {
    78. text: 'Tulip',
    79. count: 20
    80. }
    81. ],
    82. rotate: true,
    83. aspect: 'spiral',
    84. style: {
    85. alpha: 0.5,
    86. backgroundColor: '#FCE4EC',
    87. borderRadius: 5,
    88. fontFamily: 'Nothing You Could Do',
    89. padding: '5px 10px',
    90. textAlpha: 1,
    91. hoverState: {
    92. alpha: 0.8,
    93. backgroundColor: '#E3F2FD',
    94. borderColor: '#2196F3',
    95. borderRadius: 5,
    96. borderWidth: 1,
    97. lineStyle: 'dotted'
    98. },
    99. tooltip: {
    100. alpha: 0.5,
    101. backgroundColor: '#E8F5E9',
    102. borderColor: '#4CAF50',
    103. borderRadius: 5,
    104. borderWidth: 1,
    105. fontColor: '#4CAF50',
    106. fontFamily: 'Georgia',
    107. lineStyle: 'dashed',
    108. padding: '3px 5px',
    109. text: '%hits',
    110. textAlpha: 1,
    111. visible: true
    112. }
    113. }
    114. }
    115. };
    116.  
    117. zingchart.render({
    118. id: 'myChart',
    119. data: myConfig,
    120. height: 400,
    121. width: '100%'
    122. });
    123. </script>
    124. </body>
    125.  
    126. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <link href="https://fonts.googleapis.com/css?family=Nothing+You+Could+Do" rel="stylesheet">
    9.  
    10. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    11. </head>
    12.  
    13. <body>
    14. <div id="myChart"></div>
    15. </body>
    16.  
    17. </html>
    1.  
    1. var myConfig = {
    2. type: 'wordcloud',
    3. options: {
    4. words: [{
    5. text: 'Flowers',
    6. count: 100
    7. },
    8. {
    9. text: 'Alstroemeria',
    10. count: 5
    11. },
    12. {
    13. text: 'Bearded Iris',
    14. count: 15
    15. },
    16. {
    17. text: 'Chrysanthemum',
    18. count: 10
    19. },
    20. {
    21. text: 'Calla Lily',
    22. count: 20
    23. },
    24. {
    25. text: 'Daffodil',
    26. count: 15
    27. },
    28. {
    29. text: 'Freesia',
    30. count: 40
    31. },
    32. {
    33. text: 'Garden Party Lily',
    34. count: 5
    35. },
    36. {
    37. text: 'Gladiolus',
    38. count: 5
    39. },
    40. {
    41. text: 'Peony',
    42. count: 10
    43. },
    44. {
    45. text: 'Ranunculus',
    46. count: 5
    47. },
    48. {
    49. text: 'Rose',
    50. count: 25
    51. },
    52. {
    53. text: 'Stargazer Lily',
    54. count: 30
    55. },
    56. {
    57. text: 'Torch Lily',
    58. count: 10
    59. },
    60. {
    61. text: 'Tulip',
    62. count: 20
    63. }
    64. ],
    65. rotate: true,
    66. aspect: 'spiral',
    67. style: {
    68. alpha: 0.5,
    69. backgroundColor: '#FCE4EC',
    70. borderRadius: 5,
    71. fontFamily: 'Nothing You Could Do',
    72. padding: '5px 10px',
    73. textAlpha: 1,
    74. hoverState: {
    75. alpha: 0.8,
    76. backgroundColor: '#E3F2FD',
    77. borderColor: '#2196F3',
    78. borderRadius: 5,
    79. borderWidth: 1,
    80. lineStyle: 'dotted'
    81. },
    82. tooltip: {
    83. alpha: 0.5,
    84. backgroundColor: '#E8F5E9',
    85. borderColor: '#4CAF50',
    86. borderRadius: 5,
    87. borderWidth: 1,
    88. fontColor: '#4CAF50',
    89. fontFamily: 'Georgia',
    90. lineStyle: 'dashed',
    91. padding: '3px 5px',
    92. text: '%hits',
    93. textAlpha: 1,
    94. visible: true
    95. }
    96. }
    97. }
    98. };
    99.  
    100. zingchart.render({
    101. id: 'myChart',
    102. data: myConfig,
    103. height: 400,
    104. width: '100%'
    105. });