• 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. height: 100%;
    13. width: 100%;
    14. margin: 0;
    15. padding: 0;
    16. }
    17.  
    18. #myChart {
    19. height: 100%;
    20. width: 100%;
    21. min-height: 150px;
    22. }
    23.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    32. <script>
    33. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    34. var myConfig = {
    35. "type": "chord",
    36. "-background-color": "#ff0",
    37. "title": {
    38. "text-align": "left"
    39. },
    40. "options": {
    41. "style": {
    42. "chord": {
    43. "tooltip": {
    44. "text-chord": "%text-destination receives from %text-source:%value-destination and sends to %text-source:%value-source",
    45. "visible": true,
    46. "font-size": 14
    47. },
    48. "alpha": 0.5,
    49. "hover-state": {
    50. "alpha": 1
    51. },
    52. "border-width": 2
    53. },
    54. "item": {},
    55. "label": {
    56. "angle": 90,
    57. "font-size": 12,
    58. "bold": true,
    59. "-auto-align": true,
    60. "offset-r": 5
    61. },
    62. "tick": {
    63. "visible": false
    64. },
    65. "band": {
    66. "tooltip": {
    67. "text": "%text",
    68. "visible": true,
    69. "font-size": 14
    70. }
    71. }
    72. },
    73. "palette": ["#29A2CC ", "#C81313 ", "#699518 ", "#DF7525 ", "#9943C1 ", "#95540E ", "#265E96 ", "#6B7075 ", "#96C245 ", "#B5A603 "],
    74. "angle-padding": 2,
    75. "group-padding": 110,
    76. "group-offset": 0,
    77. "band-space": 2,
    78. "band-width": 0.1,
    79. "color-type": "palette",
    80. "size-factor": 1.35
    81. },
    82. "plot": {
    83. "value-box": {
    84. "visible": true,
    85. "angle": 90,
    86. "text": "%node-value",
    87. "color": "#fff",
    88. "bold": true,
    89. "auto-align": true
    90. }
    91. },
    92. "series": [{
    93. "values": [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    94. "text": "Afghanistan",
    95. "group": 1
    96. },
    97. {
    98. "values": [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    99. "text": "Iraq",
    100. "group": 2
    101. },
    102. {
    103. "values": [25.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    104. "text": "Argentina",
    105. "group": 2
    106. },
    107. {
    108. "values": [100.0, 50.0, 30.0, 10.0, 10.0, 10.0],
    109. "text": "Belgium",
    110. "group": 2
    111. },
    112. {
    113. "values": [60.0, 50.0, 50.0, 10.0, 10.0, 10.0],
    114. "text": "Austria",
    115. "group": 1
    116. },
    117. {
    118. "values": [70.0, 70.0, 25.0, 10.0, 10.0, 10.0],
    119. "text": "Germany",
    120. "group": 1
    121. }
    122. ]
    123. };
    124.  
    125. zingchart.render({
    126. id: 'myChart',
    127. data: myConfig,
    128. height: '100%',
    129. width: '100%'
    130. });
    131. </script>
    132. </body>
    133.  
    134. </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"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    13. </body>
    14.  
    15. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. var myConfig = {
    2. "type": "chord",
    3. "-background-color": "#ff0",
    4. "title": {
    5. "text-align": "left"
    6. },
    7. "options": {
    8. "style": {
    9. "chord": {
    10. "tooltip": {
    11. "text-chord": "%text-destination receives from %text-source:%value-destination and sends to %text-source:%value-source",
    12. "visible": true,
    13. "font-size": 14
    14. },
    15. "alpha": 0.5,
    16. "hover-state": {
    17. "alpha": 1
    18. },
    19. "border-width": 2
    20. },
    21. "item": {},
    22. "label": {
    23. "angle": 90,
    24. "font-size": 12,
    25. "bold": true,
    26. "-auto-align": true,
    27. "offset-r": 5
    28. },
    29. "tick": {
    30. "visible": false
    31. },
    32. "band": {
    33. "tooltip": {
    34. "text": "%text",
    35. "visible": true,
    36. "font-size": 14
    37. }
    38. }
    39. },
    40. "palette": ["#29A2CC ", "#C81313 ", "#699518 ", "#DF7525 ", "#9943C1 ", "#95540E ", "#265E96 ", "#6B7075 ", "#96C245 ", "#B5A603 "],
    41. "angle-padding": 2,
    42. "group-padding": 110,
    43. "group-offset": 0,
    44. "band-space": 2,
    45. "band-width": 0.1,
    46. "color-type": "palette",
    47. "size-factor": 1.35
    48. },
    49. "plot": {
    50. "value-box": {
    51. "visible": true,
    52. "angle": 90,
    53. "text": "%node-value",
    54. "color": "#fff",
    55. "bold": true,
    56. "auto-align": true
    57. }
    58. },
    59. "series": [{
    60. "values": [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    61. "text": "Afghanistan",
    62. "group": 1
    63. },
    64. {
    65. "values": [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    66. "text": "Iraq",
    67. "group": 2
    68. },
    69. {
    70. "values": [25.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    71. "text": "Argentina",
    72. "group": 2
    73. },
    74. {
    75. "values": [100.0, 50.0, 30.0, 10.0, 10.0, 10.0],
    76. "text": "Belgium",
    77. "group": 2
    78. },
    79. {
    80. "values": [60.0, 50.0, 50.0, 10.0, 10.0, 10.0],
    81. "text": "Austria",
    82. "group": 1
    83. },
    84. {
    85. "values": [70.0, 70.0, 25.0, 10.0, 10.0, 10.0],
    86. "text": "Germany",
    87. "group": 1
    88. }
    89. ]
    90. };
    91.  
    92. zingchart.render({
    93. id: 'myChart',
    94. data: myConfig,
    95. height: '100%',
    96. width: '100%'
    97. });