• 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": "bar",
    26. "plot": {
    27. "stacked": 0,
    28. "line-width": 2,
    29. "value-box": {
    30. "visible": 0
    31. },
    32. "animation": {
    33. "effect": "ANIMATION_FADE_IN",
    34. "speed": "2000"
    35. },
    36. },
    37. "shapes": [{
    38. "type": "rect",
    39. "id": "animation",
    40. "width": "100",
    41. "height": "30",
    42. "background-color": "#666 #333",
    43. "border-radius": "10px",
    44. "x": "50px",
    45. "y": "15px",
    46. "label": {
    47. "text": "Start Animation",
    48. "font-color": "#fff"
    49. }
    50. }],
    51. "series": [{
    52. "values": [34, 102, 131, 80, 134, 151, 99, 27, 29, 126, 112, 77, 112, 70, 47, 138, 163, 34, 116, 38, 154, 124, 39, 33, 76, 118, 146, 108, 80, 99]
    53. },
    54. {
    55. "values": [186, 118, 189, 65, 109, 129, 74, 195, 65, 141, 76, 194, 134, 155, 99, 80, 167, 201, 92, 172, 93, 145, 148, 153, 166, 147, 74, 108, 159, 83]
    56. },
    57. {
    58. "values": [245, 137, 126, 233, 168, 141, 186, 221, 153, 155, 135, 153, 130, 233, 154, 189, 216, 147, 100, 186, 204, 139, 204, 140, 203, 151, 152, 120, 183, 135]
    59. },
    60. {
    61. "values": [191, 251, 226, 168, 239, 283, 148, 155, 269, 165, 150, 232, 221, 207, 227, 255, 144, 207, 204, 182, 261, 240, 193, 179, 244, 289, 204, 205, 222, 288]
    62. }
    63. ]
    64. }]
    65. };
    66.  
    67. zingchart.render({
    68. id: 'myChart',
    69. data: myConfig,
    70. height: "100%",
    71. width: "100%"
    72. });
    73.  
    74. zingchart.shape_click = function(p) {
    75. if (p.shapeid == 'animation') {
    76. zingchart.exec('myChart', 'reload');
    77. }
    78. }
    79. </script>
    80. </body>
    81.  
    82. </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": "bar",
    4. "plot": {
    5. "stacked": 0,
    6. "line-width": 2,
    7. "value-box": {
    8. "visible": 0
    9. },
    10. "animation": {
    11. "effect": "ANIMATION_FADE_IN",
    12. "speed": "2000"
    13. },
    14. },
    15. "shapes": [{
    16. "type": "rect",
    17. "id": "animation",
    18. "width": "100",
    19. "height": "30",
    20. "background-color": "#666 #333",
    21. "border-radius": "10px",
    22. "x": "50px",
    23. "y": "15px",
    24. "label": {
    25. "text": "Start Animation",
    26. "font-color": "#fff"
    27. }
    28. }],
    29. "series": [{
    30. "values": [34, 102, 131, 80, 134, 151, 99, 27, 29, 126, 112, 77, 112, 70, 47, 138, 163, 34, 116, 38, 154, 124, 39, 33, 76, 118, 146, 108, 80, 99]
    31. },
    32. {
    33. "values": [186, 118, 189, 65, 109, 129, 74, 195, 65, 141, 76, 194, 134, 155, 99, 80, 167, 201, 92, 172, 93, 145, 148, 153, 166, 147, 74, 108, 159, 83]
    34. },
    35. {
    36. "values": [245, 137, 126, 233, 168, 141, 186, 221, 153, 155, 135, 153, 130, 233, 154, 189, 216, 147, 100, 186, 204, 139, 204, 140, 203, 151, 152, 120, 183, 135]
    37. },
    38. {
    39. "values": [191, 251, 226, 168, 239, 283, 148, 155, 269, 165, 150, 232, 221, 207, 227, 255, 144, 207, 204, 182, 261, 240, 193, 179, 244, 289, 204, 205, 222, 288]
    40. }
    41. ]
    42. }]
    43. };
    44.  
    45. zingchart.render({
    46. id: 'myChart',
    47. data: myConfig,
    48. height: "100%",
    49. width: "100%"
    50. });
    51.  
    52. zingchart.shape_click = function(p) {
    53. if (p.shapeid == 'animation') {
    54. zingchart.exec('myChart', 'reload');
    55. }
    56. }