• 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. height: 100%;
    14. width: 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. "graphset": [{
    25. "type": "pie",
    26. "plot": {
    27. "stacked": 0,
    28. "line-width": 2,
    29. "animation": {
    30. "effect": "2",
    31. "method": "3",
    32. "sequence": "ANIMATION_BY_PLOT",
    33. "speed": "ANIMATION_FAST"
    34. },
    35. "value-box": {
    36. "visible": 0
    37. }
    38. },
    39. "shapes": [{
    40. "type": "rect",
    41. "id": "animation",
    42. "width": "100",
    43. "height": "30",
    44. "background-color": "#666 #333",
    45. "border-radius": "10px",
    46. "x": "50px",
    47. "y": "15px",
    48. "label": {
    49. "text": "Start Animation",
    50. "font-color": "#fff"
    51. }
    52. }],
    53. "series": [{
    54. "values": [34]
    55. },
    56. {
    57. "values": [186]
    58. },
    59. {
    60. "values": [245]
    61. },
    62. {
    63. "values": [191]
    64. }
    65. ]
    66. }]
    67. };
    68.  
    69. zingchart.render({
    70. id: 'myChart',
    71. data: myConfig,
    72. height: "100%",
    73. width: "100%"
    74. });
    75.  
    76. zingchart.shape_click = function(p) {
    77. if (p.shapeid == 'animation') {
    78. zingchart.exec('myChart', 'reload');
    79. }
    80. }
    81. </script>
    82. </body>
    83.  
    84. </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. height: 100%;
    5. width: 100%;
    6. }
    1. var myConfig = {
    2. "graphset": [{
    3. "type": "pie",
    4. "plot": {
    5. "stacked": 0,
    6. "line-width": 2,
    7. "animation": {
    8. "effect": "2",
    9. "method": "3",
    10. "sequence": "ANIMATION_BY_PLOT",
    11. "speed": "ANIMATION_FAST"
    12. },
    13. "value-box": {
    14. "visible": 0
    15. }
    16. },
    17. "shapes": [{
    18. "type": "rect",
    19. "id": "animation",
    20. "width": "100",
    21. "height": "30",
    22. "background-color": "#666 #333",
    23. "border-radius": "10px",
    24. "x": "50px",
    25. "y": "15px",
    26. "label": {
    27. "text": "Start Animation",
    28. "font-color": "#fff"
    29. }
    30. }],
    31. "series": [{
    32. "values": [34]
    33. },
    34. {
    35. "values": [186]
    36. },
    37. {
    38. "values": [245]
    39. },
    40. {
    41. "values": [191]
    42. }
    43. ]
    44. }]
    45. };
    46.  
    47. zingchart.render({
    48. id: 'myChart',
    49. data: myConfig,
    50. height: "100%",
    51. width: "100%"
    52. });
    53.  
    54. zingchart.shape_click = function(p) {
    55. if (p.shapeid == 'animation') {
    56. zingchart.exec('myChart', 'reload');
    57. }
    58. }