• 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. let chartConfig = {
    35. type: 'chord',
    36. title: {
    37. textAlign: 'left'
    38. },
    39. options: {
    40. style: {
    41. chord: {
    42. alpha: 0.5,
    43. borderWidth: '2px',
    44. hoverState: {
    45. alpha: 1
    46. },
    47. tooltip: {
    48. textChord: '%text-destination receives from %text-source:%value-destination and sends to %text-source:%value-source',
    49. fontSize: '14px',
    50. visible: true,
    51. },
    52. },
    53. item: {},
    54. label: {
    55. angle: 90,
    56. bold: true,
    57. fontSize: '12px',
    58. offsetR: 5
    59. },
    60. tick: {
    61. visible: false
    62. },
    63. band: {
    64. tooltip: {
    65. text: '%text',
    66. fontSize: '14px',
    67. visible: true,
    68. }
    69. }
    70. },
    71. palette: ['#29A2CC ', '#C81313 ', '#699518 ', '#DF7525 ', '#9943C1 ', '#95540E ', '#265E96 ', '#6B7075 ', '#96C245 ', '#B5A603 '],
    72. anglePadding: 2,
    73. bandSpace: 2,
    74. bandWidth: 0.1,
    75. colorType: 'palette',
    76. groupOffset: 100,
    77. sizeFactor: 1.35
    78. },
    79. plot: {
    80. valueBox: {
    81. text: '%node-value',
    82. angle: 90,
    83. autoAlign: true,
    84. bold: true,
    85. color: '#fff',
    86. visible: true,
    87. }
    88. },
    89. series: [{
    90. values: [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    91. text: 'Afghanistan',
    92. group: 1
    93. },
    94. {
    95. values: [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    96. text: 'Iraq',
    97. group: 2
    98. },
    99. {
    100. values: [25.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    101. text: 'Argentina',
    102. group: 2
    103. },
    104. {
    105. values: [100.0, 50.0, 30.0, 10.0, 10.0, 10.0],
    106. text: 'Belgium',
    107. group: 2
    108. },
    109. {
    110. values: [60.0, 50.0, 50.0, 10.0, 10.0, 10.0],
    111. text: 'Austria',
    112. group: 1
    113. },
    114. {
    115. values: [70.0, 70.0, 25.0, 10.0, 10.0, 10.0],
    116. text: 'Germany',
    117. group: 1
    118. }
    119. ]
    120. };
    121.  
    122. zingchart.render({
    123. id: 'myChart',
    124. data: chartConfig,
    125. height: '100%',
    126. width: '100%'
    127. });
    128. </script>
    129. </body>
    130.  
    131. </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. let chartConfig = {
    2. type: 'chord',
    3. title: {
    4. textAlign: 'left'
    5. },
    6. options: {
    7. style: {
    8. chord: {
    9. alpha: 0.5,
    10. borderWidth: '2px',
    11. hoverState: {
    12. alpha: 1
    13. },
    14. tooltip: {
    15. textChord: '%text-destination receives from %text-source:%value-destination and sends to %text-source:%value-source',
    16. fontSize: '14px',
    17. visible: true,
    18. },
    19. },
    20. item: {},
    21. label: {
    22. angle: 90,
    23. bold: true,
    24. fontSize: '12px',
    25. offsetR: 5
    26. },
    27. tick: {
    28. visible: false
    29. },
    30. band: {
    31. tooltip: {
    32. text: '%text',
    33. fontSize: '14px',
    34. visible: true,
    35. }
    36. }
    37. },
    38. palette: ['#29A2CC ', '#C81313 ', '#699518 ', '#DF7525 ', '#9943C1 ', '#95540E ', '#265E96 ', '#6B7075 ', '#96C245 ', '#B5A603 '],
    39. anglePadding: 2,
    40. bandSpace: 2,
    41. bandWidth: 0.1,
    42. colorType: 'palette',
    43. groupOffset: 100,
    44. sizeFactor: 1.35
    45. },
    46. plot: {
    47. valueBox: {
    48. text: '%node-value',
    49. angle: 90,
    50. autoAlign: true,
    51. bold: true,
    52. color: '#fff',
    53. visible: true,
    54. }
    55. },
    56. series: [{
    57. values: [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    58. text: 'Afghanistan',
    59. group: 1
    60. },
    61. {
    62. values: [10.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    63. text: 'Iraq',
    64. group: 2
    65. },
    66. {
    67. values: [25.0, 10.0, 10.0, 10.0, 10.0, 10.0],
    68. text: 'Argentina',
    69. group: 2
    70. },
    71. {
    72. values: [100.0, 50.0, 30.0, 10.0, 10.0, 10.0],
    73. text: 'Belgium',
    74. group: 2
    75. },
    76. {
    77. values: [60.0, 50.0, 50.0, 10.0, 10.0, 10.0],
    78. text: 'Austria',
    79. group: 1
    80. },
    81. {
    82. values: [70.0, 70.0, 25.0, 10.0, 10.0, 10.0],
    83. text: 'Germany',
    84. group: 1
    85. }
    86. ]
    87. };
    88.  
    89. zingchart.render({
    90. id: 'myChart',
    91. data: chartConfig,
    92. height: '100%',
    93. width: '100%'
    94. });