• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
    8.  
    9. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. <style>
    11. #reload {
    12. background: #00BAF0;
    13. border: none;
    14. border-radius: 4px;
    15. color: white;
    16. cursor: pointer;
    17. font-size: 16px;
    18. padding: 4px 8px;
    19. }
    20. </style>
    21. </head>
    22.  
    23. <body>
    24. <div id='myChart'></div>
    25. <button id="reload"><i class="fa fa-refresh"></i>&nbsp;Replay Animation</button>
    26. <script>
    27. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    28. var myConfig = {
    29. type: "bar",
    30. plot: {
    31. animation: {
    32. effect: 4,
    33. method: 0,
    34. sequence: 1
    35. }
    36. },
    37. series: [{
    38. values: [35, 42, 67, 89, 25, 34, 67, 85]
    39. },
    40. {
    41. values: [10, 15, 10, 15, 10, 15, 10, 15]
    42. },
    43. {
    44. values: [30, 10, 50, 20, 15, 10, 35, 10]
    45. }
    46. ]
    47. };
    48.  
    49. zingchart.render({
    50. id: 'myChart',
    51. data: myConfig,
    52. height: 350,
    53. width: "100%"
    54. });
    55.  
    56. var reload = document.querySelector('#reload');
    57. if (reload) {
    58. reload.addEventListener('click', function() {
    59. zingchart.exec('myChart', 'reload');
    60. });
    61. }
    62. </script>
    63. </body>
    64.  
    65. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css" rel="stylesheet">
    8.  
    9. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <button id="reload"><i class="fa fa-refresh"></i>&nbsp;Replay Animation</button>
    15. </body>
    16.  
    17. </html>
    1. #reload {
    2. background: #00BAF0;
    3. border: none;
    4. border-radius: 4px;
    5. color: white;
    6. cursor: pointer;
    7. font-size: 16px;
    8. padding: 4px 8px;
    9. }
    1. var myConfig = {
    2. type: "bar",
    3. plot: {
    4. animation: {
    5. effect: 4,
    6. method: 0,
    7. sequence: 1
    8. }
    9. },
    10. series: [{
    11. values: [35, 42, 67, 89, 25, 34, 67, 85]
    12. },
    13. {
    14. values: [10, 15, 10, 15, 10, 15, 10, 15]
    15. },
    16. {
    17. values: [30, 10, 50, 20, 15, 10, 35, 10]
    18. }
    19. ]
    20. };
    21.  
    22. zingchart.render({
    23. id: 'myChart',
    24. data: myConfig,
    25. height: 350,
    26. width: "100%"
    27. });
    28.  
    29. var reload = document.querySelector('#reload');
    30. if (reload) {
    31. reload.addEventListener('click', function() {
    32. zingchart.exec('myChart', 'reload');
    33. });
    34. }