• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="//www.zingchart.com/scripts/zcDocs.js"></script>
    8. <link href='//www.zingchart.com/css/zcDocs.css' rel='stylesheet' type='text/css'>
    9.  
    10. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    11. <style></style>
    12. </head>
    13.  
    14. <body>
    15. <div id='demo-chart'></div>
    16. <button class='btn btn-info' id='demo1'>Demo 1</button>
    17. <button class='btn btn-danger' id='reload'>Reset</button>
    18. <pre id='output'></pre>
    19. <script>
    20. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    21. var myConfig = {
    22. 'type': 'line',
    23. 'series': [{
    24. 'values': [11, 26, 7, 44, 19]
    25. }]
    26. };
    27.  
    28. zingchart.render({
    29. id: 'demo-chart',
    30. data: myConfig,
    31. height: 400,
    32. width: '100%'
    33. });
    34.  
    35. demo1.addEventListener('click', function() {
    36. let output = zingchart.exec('demo-chart', 'setdata', {
    37. 'data': {
    38. 'type': 'bar',
    39. 'series': [{
    40. 'values': [7, 44, 11, 11, 26]
    41. },
    42. {
    43. 'values': [17, 24, 31, 8, 16]
    44. }
    45. ]
    46. }
    47. });
    48. zcdocs.demos.dump('setdata', output);
    49. });
    50. reload.addEventListener('click', function() {
    51. zingchart.exec('demo-chart', 'reload');
    52. });
    53. </script>
    54. </body>
    55.  
    56. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="//www.zingchart.com/scripts/zcDocs.js"></script>
    8. <link href='//www.zingchart.com/css/zcDocs.css' rel='stylesheet' type='text/css'>
    9.  
    10. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    11. </head>
    12.  
    13. <body>
    14. <div id='demo-chart'></div>
    15. <button class='btn btn-info' id='demo1'>Demo 1</button>
    16. <button class='btn btn-danger' id='reload'>Reset</button>
    17. <pre id='output'></pre>
    18. </body>
    19.  
    20. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'line',
    3. 'series': [{
    4. 'values': [11, 26, 7, 44, 19]
    5. }]
    6. };
    7.  
    8. zingchart.render({
    9. id: 'demo-chart',
    10. data: myConfig,
    11. height: 400,
    12. width: '100%'
    13. });
    14.  
    15. demo1.addEventListener('click', function() {
    16. let output = zingchart.exec('demo-chart', 'setdata', {
    17. 'data': {
    18. 'type': 'bar',
    19. 'series': [{
    20. 'values': [7, 44, 11, 11, 26]
    21. },
    22. {
    23. 'values': [17, 24, 31, 8, 16]
    24. }
    25. ]
    26. }
    27. });
    28. zcdocs.demos.dump('setdata', output);
    29. });
    30. reload.addEventListener('click', function() {
    31. zingchart.exec('demo-chart', 'reload');
    32. });