• 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": "line",
    26. "plot": {
    27. "exact": 1,
    28. "shadow": 1,
    29. "alpha": 1,
    30. "shadow-distance": 1,
    31. "stacked": 0,
    32. "line-width": 2,
    33. "slice-start": 15,
    34. "animation": {
    35. "delay": 10,
    36. "effect": "3",
    37. "speed": "500",
    38. "method": "ANIMATION_BOUNCE_EASE_OUT",
    39. "sequence": "0"
    40. },
    41. "value-box": {
    42. "visible": 0,
    43. "text": "%v",
    44. "background-color": "#fff",
    45. "border-color": "#999",
    46. "border-width": 2,
    47. "border-radius": 10,
    48. "padding": 10,
    49. "placement": "out"
    50. },
    51. "marker": {
    52. "type": "circle"
    53. }
    54. },
    55. "shapes": [{
    56. "type": "rect",
    57. "id": "animation",
    58. "width": "100",
    59. "height": "30",
    60. "background-color": "#666 #333",
    61. "border-radius": "10px",
    62. "x": "50px",
    63. "y": "15px",
    64. "label": {
    65. "text": "Start Animation",
    66. "font-color": "#fff"
    67. }
    68. }],
    69. "series": [{
    70. "values": [118, 123, 46, 86, 116, 166, 29, 83, 96, 159, 91, 80, 142, 49, 88, 136, 102, 35, 166, 73, 156, 111, 27, 119, 47, 124, 84, 153, 99, 46, 124, 87, 109, 138, 47, 77, 44, 137, 103, 151, 89, 144, 51, 91, 78, 69, 48, 144, 20, 105]
    71. },
    72. {
    73. "values": [98, 142, 103, 91, 109, 186, 130, 154, 143, 208, 175, 128, 191, 83, 125, 169, 173, 189, 189, 165, 128, 98, 80, 177, 187, 134, 109, 108, 174, 162, 102, 102, 107, 136, 161, 115, 189, 174, 156, 62, 198, 161, 127, 76, 126, 60, 201, 88, 82, 87]
    74. },
    75. {
    76. "values": [162, 153, 218, 169, 136, 204, 112, 209, 172, 148, 242, 105, 149, 163, 220, 199, 244, 183, 143, 129, 247, 142, 116, 159, 227, 231, 157, 160, 225, 197, 206, 240, 197, 203, 141, 221, 154, 198, 227, 174, 248, 228, 176, 160, 157, 178, 219, 208, 144, 163]
    77. },
    78. {
    79. "values": [243, 263, 248, 257, 229, 153, 186, 148, 288, 186, 161, 267, 147, 215, 180, 251, 243, 165, 223, 236, 204, 232, 224, 141, 216, 188, 238, 206, 157, 142, 257, 179, 240, 150, 223, 242, 171, 205, 140, 256, 152, 264, 188, 209, 239, 214, 248, 200, 193, 201]
    80. }
    81. ]
    82. }]
    83. };
    84.  
    85. zingchart.render({
    86. id: 'myChart',
    87. data: myConfig,
    88. height: "100%",
    89. width: "100%"
    90. });
    91.  
    92. zingchart.shape_click = function(p) {
    93. if (p.shapeid == 'animation') {
    94. zingchart.exec('myChart', 'reload');
    95. }
    96. }
    97. </script>
    98. </body>
    99.  
    100. </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": "line",
    4. "plot": {
    5. "exact": 1,
    6. "shadow": 1,
    7. "alpha": 1,
    8. "shadow-distance": 1,
    9. "stacked": 0,
    10. "line-width": 2,
    11. "slice-start": 15,
    12. "animation": {
    13. "delay": 10,
    14. "effect": "3",
    15. "speed": "500",
    16. "method": "ANIMATION_BOUNCE_EASE_OUT",
    17. "sequence": "0"
    18. },
    19. "value-box": {
    20. "visible": 0,
    21. "text": "%v",
    22. "background-color": "#fff",
    23. "border-color": "#999",
    24. "border-width": 2,
    25. "border-radius": 10,
    26. "padding": 10,
    27. "placement": "out"
    28. },
    29. "marker": {
    30. "type": "circle"
    31. }
    32. },
    33. "shapes": [{
    34. "type": "rect",
    35. "id": "animation",
    36. "width": "100",
    37. "height": "30",
    38. "background-color": "#666 #333",
    39. "border-radius": "10px",
    40. "x": "50px",
    41. "y": "15px",
    42. "label": {
    43. "text": "Start Animation",
    44. "font-color": "#fff"
    45. }
    46. }],
    47. "series": [{
    48. "values": [118, 123, 46, 86, 116, 166, 29, 83, 96, 159, 91, 80, 142, 49, 88, 136, 102, 35, 166, 73, 156, 111, 27, 119, 47, 124, 84, 153, 99, 46, 124, 87, 109, 138, 47, 77, 44, 137, 103, 151, 89, 144, 51, 91, 78, 69, 48, 144, 20, 105]
    49. },
    50. {
    51. "values": [98, 142, 103, 91, 109, 186, 130, 154, 143, 208, 175, 128, 191, 83, 125, 169, 173, 189, 189, 165, 128, 98, 80, 177, 187, 134, 109, 108, 174, 162, 102, 102, 107, 136, 161, 115, 189, 174, 156, 62, 198, 161, 127, 76, 126, 60, 201, 88, 82, 87]
    52. },
    53. {
    54. "values": [162, 153, 218, 169, 136, 204, 112, 209, 172, 148, 242, 105, 149, 163, 220, 199, 244, 183, 143, 129, 247, 142, 116, 159, 227, 231, 157, 160, 225, 197, 206, 240, 197, 203, 141, 221, 154, 198, 227, 174, 248, 228, 176, 160, 157, 178, 219, 208, 144, 163]
    55. },
    56. {
    57. "values": [243, 263, 248, 257, 229, 153, 186, 148, 288, 186, 161, 267, 147, 215, 180, 251, 243, 165, 223, 236, 204, 232, 224, 141, 216, 188, 238, 206, 157, 142, 257, 179, 240, 150, 223, 242, 171, 205, 140, 256, 152, 264, 188, 209, 239, 214, 248, 200, 193, 201]
    58. }
    59. ]
    60. }]
    61. };
    62.  
    63. zingchart.render({
    64. id: 'myChart',
    65. data: myConfig,
    66. height: "100%",
    67. width: "100%"
    68. });
    69.  
    70. zingchart.shape_click = function(p) {
    71. if (p.shapeid == 'animation') {
    72. zingchart.exec('myChart', 'reload');
    73. }
    74. }