• 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. #myChart {
    13. width: 100%;
    14. height: 100%;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <div id='myChart'></div>
    21. <script>
    22. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    23. var myConfig = {
    24. "type": "pie",
    25. "title": {
    26. "text": "%pie-total-value"
    27. },
    28. "plot": {
    29. "slice": "50%",
    30. "value-box": {
    31. "text": "Total: %pie-total-value",
    32. "font-color": "black",
    33. "placement": "center",
    34. "rules": [{
    35. "rule": "%p != 0",
    36. "visible": false
    37. }]
    38. }
    39. },
    40. "series": [{
    41. "values": [59]
    42. },
    43. {
    44. "values": [55]
    45. },
    46. {
    47. "values": [30]
    48. },
    49. {
    50. "values": [28]
    51. },
    52. {
    53. "values": [15]
    54. }
    55. ]
    56. };
    57.  
    58. zingchart.render({
    59. id: 'myChart',
    60. data: myConfig,
    61. height: 300,
    62. width: "100%"
    63. });
    64. </script>
    65. </body>
    66.  
    67. </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. html,
    2. body,
    3. #myChart {
    4. width: 100%;
    5. height: 100%;
    6. }
    1. var myConfig = {
    2. "type": "pie",
    3. "title": {
    4. "text": "%pie-total-value"
    5. },
    6. "plot": {
    7. "slice": "50%",
    8. "value-box": {
    9. "text": "Total: %pie-total-value",
    10. "font-color": "black",
    11. "placement": "center",
    12. "rules": [{
    13. "rule": "%p != 0",
    14. "visible": false
    15. }]
    16. }
    17. },
    18. "series": [{
    19. "values": [59]
    20. },
    21. {
    22. "values": [55]
    23. },
    24. {
    25. "values": [30]
    26. },
    27. {
    28. "values": [28]
    29. },
    30. {
    31. "values": [15]
    32. }
    33. ]
    34. };
    35.  
    36. zingchart.render({
    37. id: 'myChart',
    38. data: myConfig,
    39. height: 300,
    40. width: "100%"
    41. });