• 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. "type": "bar",
    25. "plot": {
    26. "exact": 1,
    27. "shadow": 1,
    28. "alpha": 1,
    29. "shadow-distance": 1,
    30. "stacked": 0,
    31. "line-width": 2,
    32. "slice-start": 15,
    33. "value-box": {
    34. "visible": 0
    35. },
    36. "animation": {
    37. "effect": "3",
    38. "speed": "500",
    39. "method": "5",
    40. "sequence": "1"
    41. },
    42. },
    43. "shapes": [{
    44. "type": "rect",
    45. "id": "animation1",
    46. "width": "100",
    47. "height": "30",
    48. "background-color": "#666 #333",
    49. "border-radius": "10px",
    50. "x": "50px",
    51. "y": "15px",
    52. "label": {
    53. "text": "Start Animation",
    54. "font-color": "#fff"
    55. }
    56. }],
    57. "series": [{
    58. "values": [142, 169, 102, 62, 59, 104, 108]
    59. },
    60. {
    61. "values": [162, 105, 209, 207, 100, 157, 148]
    62. },
    63. {
    64. "values": [192, 247, 197, 214, 234, 182, 131]
    65. },
    66. {
    67. "values": [202, 273, 237, 269, 204, 166, 258]
    68. }
    69. ]
    70. };
    71.  
    72. zingchart.render({
    73. id: 'myChart',
    74. data: myConfig,
    75. height: "100%",
    76. width: "100%"
    77. });
    78.  
    79. zingchart.shape_click = function(p) {
    80. if (p.shapeid == 'animation1') {
    81. zingchart.exec('myChart', 'reload');
    82. }
    83. }
    84. </script>
    85. </body>
    86.  
    87. </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. "type": "bar",
    3. "plot": {
    4. "exact": 1,
    5. "shadow": 1,
    6. "alpha": 1,
    7. "shadow-distance": 1,
    8. "stacked": 0,
    9. "line-width": 2,
    10. "slice-start": 15,
    11. "value-box": {
    12. "visible": 0
    13. },
    14. "animation": {
    15. "effect": "3",
    16. "speed": "500",
    17. "method": "5",
    18. "sequence": "1"
    19. },
    20. },
    21. "shapes": [{
    22. "type": "rect",
    23. "id": "animation1",
    24. "width": "100",
    25. "height": "30",
    26. "background-color": "#666 #333",
    27. "border-radius": "10px",
    28. "x": "50px",
    29. "y": "15px",
    30. "label": {
    31. "text": "Start Animation",
    32. "font-color": "#fff"
    33. }
    34. }],
    35. "series": [{
    36. "values": [142, 169, 102, 62, 59, 104, 108]
    37. },
    38. {
    39. "values": [162, 105, 209, 207, 100, 157, 148]
    40. },
    41. {
    42. "values": [192, 247, 197, 214, 234, 182, 131]
    43. },
    44. {
    45. "values": [202, 273, 237, 269, 204, 166, 258]
    46. }
    47. ]
    48. };
    49.  
    50. zingchart.render({
    51. id: 'myChart',
    52. data: myConfig,
    53. height: "100%",
    54. width: "100%"
    55. });
    56.  
    57. zingchart.shape_click = function(p) {
    58. if (p.shapeid == 'animation1') {
    59. zingchart.exec('myChart', 'reload');
    60. }
    61. }