• 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": "ring",
    18. "title": {
    19. "text": "Value Boxes"
    20. },
    21. "subtitle": {
    22. "text": "with placement set to 'center' to show the total pie value",
    23. "font-weight": "normal"
    24. },
    25. "plot": {
    26. "value-box": {
    27. "text": "%pie-total-value",
    28. "placement": "center",
    29. "font-color": "black",
    30. "font-size": 35,
    31. "font-family": "Georgia",
    32. "font-weight": "normal",
    33. "rules": [{
    34. "rule": "%p != 0",
    35. "visible": false
    36. }]
    37. },
    38. "tooltip": {
    39. "text": "%t: %v (%npv%)",
    40. "font-color": "black",
    41. "font-family": "Georgia",
    42. "text-alpha": 1,
    43. "background-color": "white",
    44. "alpha": 0.7,
    45. "border-width": 1,
    46. "border-color": "#cccccc",
    47. "line-style": "dotted",
    48. "border-radius": "10px",
    49. "padding": "10%",
    50. "placement": "node:center"
    51. },
    52. "slice": "50%",
    53. "border-width": 1,
    54. "border-color": "#cccccc",
    55. "line-style": "dotted"
    56. },
    57. "plotarea": {
    58. "margin-top": "12%"
    59. },
    60. "series": [{
    61. "values": [234],
    62. "background-color": "#cc0000",
    63. "text": "Alpha"
    64. },
    65. {
    66. "values": [121],
    67. "background-color": "#ff3300",
    68. "text": "Beta"
    69. },
    70. {
    71. "values": [77],
    72. "background-color": "#ff6600",
    73. "text": "Gamma"
    74. },
    75. {
    76. "values": [65],
    77. "background-color": "#ff9933",
    78. "text": "Delta"
    79. },
    80. {
    81. "values": [59],
    82. "background-color": "#ffcc00",
    83. "text": "Epsilon"
    84. },
    85. {
    86. "values": [35],
    87. "background-color": "#ace600",
    88. "text": "Zeta"
    89. },
    90. {
    91. "values": [34],
    92. "background-color": "#88cc00",
    93. "text": "Eta"
    94. },
    95. {
    96. "values": [31],
    97. "background-color": "#339933",
    98. "text": "Theta"
    99. },
    100. {
    101. "values": [16],
    102. "background-color": "#66ccff",
    103. "text": "Iota"
    104. },
    105. {
    106. "values": [14],
    107. "background-color": "#3399ff",
    108. "text": "Kappa"
    109. },
    110. {
    111. "values": [13],
    112. "background-color": "#0066ff",
    113. "text": "Lambda"
    114. },
    115. {
    116. "values": [12],
    117. "background-color": "#3333cc",
    118. "text": "Mu"
    119. },
    120. {
    121. "values": [11],
    122. "background-color": "#6600ff",
    123. "text": "Nu"
    124. },
    125. {
    126. "values": [10],
    127. "background-color": "#9933ff",
    128. "text": "Xi"
    129. },
    130. {
    131. "values": [9],
    132. "background-color": "#9999ff",
    133. "text": "Omicron"
    134. }
    135. ]
    136. };
    137.  
    138. zingchart.render({
    139. id: 'myChart',
    140. data: myConfig,
    141. height: 400,
    142. width: "100%"
    143. });
    144. </script>
    145. </body>
    146.  
    147. </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": "ring",
    3. "title": {
    4. "text": "Value Boxes"
    5. },
    6. "subtitle": {
    7. "text": "with placement set to 'center' to show the total pie value",
    8. "font-weight": "normal"
    9. },
    10. "plot": {
    11. "value-box": {
    12. "text": "%pie-total-value",
    13. "placement": "center",
    14. "font-color": "black",
    15. "font-size": 35,
    16. "font-family": "Georgia",
    17. "font-weight": "normal",
    18. "rules": [{
    19. "rule": "%p != 0",
    20. "visible": false
    21. }]
    22. },
    23. "tooltip": {
    24. "text": "%t: %v (%npv%)",
    25. "font-color": "black",
    26. "font-family": "Georgia",
    27. "text-alpha": 1,
    28. "background-color": "white",
    29. "alpha": 0.7,
    30. "border-width": 1,
    31. "border-color": "#cccccc",
    32. "line-style": "dotted",
    33. "border-radius": "10px",
    34. "padding": "10%",
    35. "placement": "node:center"
    36. },
    37. "slice": "50%",
    38. "border-width": 1,
    39. "border-color": "#cccccc",
    40. "line-style": "dotted"
    41. },
    42. "plotarea": {
    43. "margin-top": "12%"
    44. },
    45. "series": [{
    46. "values": [234],
    47. "background-color": "#cc0000",
    48. "text": "Alpha"
    49. },
    50. {
    51. "values": [121],
    52. "background-color": "#ff3300",
    53. "text": "Beta"
    54. },
    55. {
    56. "values": [77],
    57. "background-color": "#ff6600",
    58. "text": "Gamma"
    59. },
    60. {
    61. "values": [65],
    62. "background-color": "#ff9933",
    63. "text": "Delta"
    64. },
    65. {
    66. "values": [59],
    67. "background-color": "#ffcc00",
    68. "text": "Epsilon"
    69. },
    70. {
    71. "values": [35],
    72. "background-color": "#ace600",
    73. "text": "Zeta"
    74. },
    75. {
    76. "values": [34],
    77. "background-color": "#88cc00",
    78. "text": "Eta"
    79. },
    80. {
    81. "values": [31],
    82. "background-color": "#339933",
    83. "text": "Theta"
    84. },
    85. {
    86. "values": [16],
    87. "background-color": "#66ccff",
    88. "text": "Iota"
    89. },
    90. {
    91. "values": [14],
    92. "background-color": "#3399ff",
    93. "text": "Kappa"
    94. },
    95. {
    96. "values": [13],
    97. "background-color": "#0066ff",
    98. "text": "Lambda"
    99. },
    100. {
    101. "values": [12],
    102. "background-color": "#3333cc",
    103. "text": "Mu"
    104. },
    105. {
    106. "values": [11],
    107. "background-color": "#6600ff",
    108. "text": "Nu"
    109. },
    110. {
    111. "values": [10],
    112. "background-color": "#9933ff",
    113. "text": "Xi"
    114. },
    115. {
    116. "values": [9],
    117. "background-color": "#9999ff",
    118. "text": "Omicron"
    119. }
    120. ]
    121. };
    122.  
    123. zingchart.render({
    124. id: 'myChart',
    125. data: myConfig,
    126. height: 400,
    127. width: "100%"
    128. });