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