• 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": "Legend Toggling with Animation"
    20. },
    21. "subtitle": {
    22. "text": "Reload the chart to view animation.",
    23. "font-weight": "normal"
    24. },
    25. "legend": {
    26. "toggle-action": "remove", //to enable toggling animation
    27. "x": "75%",
    28. "y": "25%"
    29. },
    30. "plotarea": {
    31. "margin-right": "30%",
    32. "margin-top": "15%"
    33. },
    34. "plot": {
    35. "animation": {
    36. "on-legend-toggle": true, //to enable toggling animation
    37. "effect": 2, //the animation effect
    38. "method": 0, //how the animation behaves
    39. "sequence": 1, //the order of the animation
    40. "speed": 1000 //the animation speed, in milliseconds
    41. },
    42. "value-box": {
    43. "font-size": 11,
    44. "font-weight": "normal",
    45. "offset-r": "60%"
    46. }
    47. },
    48. "series": [{
    49. "values": [234]
    50. },
    51. {
    52. "values": [121]
    53. },
    54. {
    55. "values": [77]
    56. },
    57. {
    58. "values": [65]
    59. },
    60. {
    61. "values": [59]
    62. },
    63. {
    64. "values": [35]
    65. },
    66. {
    67. "values": [34]
    68. },
    69. {
    70. "values": [31]
    71. },
    72. {
    73. "values": [16]
    74. },
    75. {
    76. "values": [14]
    77. }
    78. ]
    79. };
    80.  
    81. zingchart.render({
    82. id: 'myChart',
    83. data: myConfig,
    84. height: 400,
    85. width: "100%"
    86. });
    87. </script>
    88. </body>
    89.  
    90. </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": "Legend Toggling with Animation"
    5. },
    6. "subtitle": {
    7. "text": "Reload the chart to view animation.",
    8. "font-weight": "normal"
    9. },
    10. "legend": {
    11. "toggle-action": "remove", //to enable toggling animation
    12. "x": "75%",
    13. "y": "25%"
    14. },
    15. "plotarea": {
    16. "margin-right": "30%",
    17. "margin-top": "15%"
    18. },
    19. "plot": {
    20. "animation": {
    21. "on-legend-toggle": true, //to enable toggling animation
    22. "effect": 2, //the animation effect
    23. "method": 0, //how the animation behaves
    24. "sequence": 1, //the order of the animation
    25. "speed": 1000 //the animation speed, in milliseconds
    26. },
    27. "value-box": {
    28. "font-size": 11,
    29. "font-weight": "normal",
    30. "offset-r": "60%"
    31. }
    32. },
    33. "series": [{
    34. "values": [234]
    35. },
    36. {
    37. "values": [121]
    38. },
    39. {
    40. "values": [77]
    41. },
    42. {
    43. "values": [65]
    44. },
    45. {
    46. "values": [59]
    47. },
    48. {
    49. "values": [35]
    50. },
    51. {
    52. "values": [34]
    53. },
    54. {
    55. "values": [31]
    56. },
    57. {
    58. "values": [16]
    59. },
    60. {
    61. "values": [14]
    62. }
    63. ]
    64. };
    65.  
    66. zingchart.render({
    67. id: 'myChart',
    68. data: myConfig,
    69. height: 400,
    70. width: "100%"
    71. });