• 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-danger' id='resett'>Reset</button>
    17. <button class='btn btn-info' id='demo1'>Demo1</button>
    18. <pre id='output'></pre>
    19. <script>
    20. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    21. var myConfig = {
    22. 'type': 'line',
    23. 'scale-x': {
    24. 'zooming': true
    25. },
    26. 'scale-y': {
    27. 'zooming': true
    28. },
    29. 'series': [{
    30. 'values': [11, 26, 7, 44, 19, 42, 13, 21, 15, 33, 21, 4]
    31. }]
    32. };
    33.  
    34. zingchart.render({
    35. id: 'demo-chart',
    36. data: myConfig,
    37. height: 400,
    38. width: '100%'
    39. });
    40.  
    41. demo1.addEventListener('click', function() {
    42. let output = zingchart.exec('demo-chart', 'zoomto', {
    43. 'xmin': 2,
    44. 'xmax': 4,
    45. 'ymin': 20,
    46. 'ymax': 50
    47. });
    48. zcdocs.demos.dump('zoomto', output);
    49. });
    50. reload.addEventListener('click', function() {
    51. zingchart.exec('demo-chart', 'viewall');
    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-danger' id='resett'>Reset</button>
    16. <button class='btn btn-info' id='demo1'>Demo1</button>
    17. <pre id='output'></pre>
    18. </body>
    19.  
    20. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'line',
    3. 'scale-x': {
    4. 'zooming': true
    5. },
    6. 'scale-y': {
    7. 'zooming': true
    8. },
    9. 'series': [{
    10. 'values': [11, 26, 7, 44, 19, 42, 13, 21, 15, 33, 21, 4]
    11. }]
    12. };
    13.  
    14. zingchart.render({
    15. id: 'demo-chart',
    16. data: myConfig,
    17. height: 400,
    18. width: '100%'
    19. });
    20.  
    21. demo1.addEventListener('click', function() {
    22. let output = zingchart.exec('demo-chart', 'zoomto', {
    23. 'xmin': 2,
    24. 'xmax': 4,
    25. 'ymin': 20,
    26. 'ymax': 50
    27. });
    28. zcdocs.demos.dump('zoomto', output);
    29. });
    30. reload.addEventListener('click', function() {
    31. zingchart.exec('demo-chart', 'viewall');
    32. });