• 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. "value-box": {
    35. "visible": 0,
    36. "text": "%v",
    37. "background-color": "#fff",
    38. "border-color": "#999",
    39. "border-width": 2,
    40. "border-radius": 10,
    41. "padding": 10,
    42. "placement": "out"
    43. },
    44. "marker": {
    45. "type": "circle"
    46. },
    47. "animation": {
    48. "delay": 10,
    49. "effect": "ANIMATION_SLIDE_LEFT",
    50. "speed": "400"
    51. }
    52. },
    53. "shapes": [{
    54. "type": "rect",
    55. "id": "animation",
    56. "width": "100",
    57. "height": "30",
    58. "background-color": "#666 #333",
    59. "border-radius": "10px",
    60. "x": "50px",
    61. "y": "15px",
    62. "label": {
    63. "text": "Start Animation",
    64. "font-color": "#fff"
    65. }
    66. }],
    67. "series": [{
    68. "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]
    69. },
    70. {
    71. "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]
    72. },
    73. {
    74. "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]
    75. },
    76. {
    77. "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]
    78. }
    79. ]
    80. }]
    81. };
    82.  
    83. zingchart.render({
    84. id: 'myChart',
    85. data: myConfig,
    86. height: "100%",
    87. width: "100%"
    88. });
    89.  
    90. zingchart.shape_click = function(p) {
    91. if (p.shapeid == 'animation') {
    92. zingchart.exec('myChart', 'reload');
    93. }
    94. }
    95. </script>
    96. </body>
    97.  
    98. </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. "value-box": {
    13. "visible": 0,
    14. "text": "%v",
    15. "background-color": "#fff",
    16. "border-color": "#999",
    17. "border-width": 2,
    18. "border-radius": 10,
    19. "padding": 10,
    20. "placement": "out"
    21. },
    22. "marker": {
    23. "type": "circle"
    24. },
    25. "animation": {
    26. "delay": 10,
    27. "effect": "ANIMATION_SLIDE_LEFT",
    28. "speed": "400"
    29. }
    30. },
    31. "shapes": [{
    32. "type": "rect",
    33. "id": "animation",
    34. "width": "100",
    35. "height": "30",
    36. "background-color": "#666 #333",
    37. "border-radius": "10px",
    38. "x": "50px",
    39. "y": "15px",
    40. "label": {
    41. "text": "Start Animation",
    42. "font-color": "#fff"
    43. }
    44. }],
    45. "series": [{
    46. "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]
    47. },
    48. {
    49. "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]
    50. },
    51. {
    52. "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]
    53. },
    54. {
    55. "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]
    56. }
    57. ]
    58. }]
    59. };
    60.  
    61. zingchart.render({
    62. id: 'myChart',
    63. data: myConfig,
    64. height: "100%",
    65. width: "100%"
    66. });
    67.  
    68. zingchart.shape_click = function(p) {
    69. if (p.shapeid == 'animation') {
    70. zingchart.exec('myChart', 'reload');
    71. }
    72. }