• 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.  
    11. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    12. <style></style>
    13. </head>
    14.  
    15. <body>
    16. <div id='demo-chart'></div>
    17. <button class='btn btn-info' id='demo1'>ZoomIn</button>
    18. <button class='btn btn-info' id='demo2'>ZoomOut</button>
    19. <button class='btn btn-info' id='demo3'>ViewAll</button>
    20. <pre id='output'></pre>
    21. <script>
    22. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    23. var myConfig = {
    24. 'type': 'line',
    25. 'scale-x': {
    26. 'zooming': true
    27. },
    28. preview: {
    29. adjustLayout: true
    30. },
    31. plotarea: {
    32. adjustLayout: true
    33. },
    34. 'series': [{
    35. 'values': [11, 26, 7, 44, 19, 42, 13, 21, 15, 33]
    36. }]
    37. };
    38.  
    39. zingchart.render({
    40. id: 'demo-chart',
    41. data: myConfig,
    42. height: 400,
    43. width: '100%'
    44. });
    45.  
    46. demo1.addEventListener('click', function() {
    47. zingchart.exec('demo-chart', 'zoomin');
    48. });
    49. demo2.addEventListener('click', function() {
    50. zingchart.exec('demo-chart', 'zoomout');
    51. });
    52. demo3.addEventListener('click', function() {
    53. zingchart.exec('demo-chart', 'viewall');
    54. });
    55. </script>
    56. </body>
    57.  
    58. </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.  
    11. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    12. </head>
    13.  
    14. <body>
    15. <div id='demo-chart'></div>
    16. <button class='btn btn-info' id='demo1'>ZoomIn</button>
    17. <button class='btn btn-info' id='demo2'>ZoomOut</button>
    18. <button class='btn btn-info' id='demo3'>ViewAll</button>
    19. <pre id='output'></pre>
    20. </body>
    21.  
    22. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'line',
    3. 'scale-x': {
    4. 'zooming': true
    5. },
    6. preview: {
    7. adjustLayout: true
    8. },
    9. plotarea: {
    10. adjustLayout: true
    11. },
    12. 'series': [{
    13. 'values': [11, 26, 7, 44, 19, 42, 13, 21, 15, 33]
    14. }]
    15. };
    16.  
    17. zingchart.render({
    18. id: 'demo-chart',
    19. data: myConfig,
    20. height: 400,
    21. width: '100%'
    22. });
    23.  
    24. demo1.addEventListener('click', function() {
    25. zingchart.exec('demo-chart', 'zoomin');
    26. });
    27. demo2.addEventListener('click', function() {
    28. zingchart.exec('demo-chart', 'zoomout');
    29. });
    30. demo3.addEventListener('click', function() {
    31. zingchart.exec('demo-chart', 'viewall');
    32. });