• 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='reset'>Reset</button>
    17. <button class='btn btn-info' id='demo1'>Run Demo 1</button>
    18. <pre id='output'></pre>
    19. <script>
    20. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    21. var myConfig = {
    22. 'type': 'bar',
    23. 'legend': {},
    24. 'series': [{
    25. 'values': [11, 26, 7, 44, 11]
    26. },
    27. {
    28. 'values': [42, 13, 21, 15, 33]
    29. }
    30. ]
    31. };
    32.  
    33. zingchart.resize = function(p) {
    34. zcdocs.demos.dump('resize', p);
    35. }
    36.  
    37.  
    38. zingchart.render({
    39. id: 'demo-chart',
    40. data: myConfig,
    41. height: 400,
    42. width: '100%'
    43. });
    44.  
    45. demo1.addEventListener('click', function() {
    46. zingchart.exec('demo-chart', 'resize', {
    47. 'width': zcdocs.utils.rvalue(300, 450),
    48. 'height': zcdocs.utils.rvalue(150, 250)
    49. });
    50. });
    51. reset.addEventListener('click', function() {
    52. zingchart.exec('demo-chart', 'resize', {
    53. 'width': 480,
    54. 'height': 300
    55. });
    56. });
    57. </script>
    58. </body>
    59.  
    60. </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='reset'>Reset</button>
    16. <button class='btn btn-info' id='demo1'>Run Demo 1</button>
    17. <pre id='output'></pre>
    18. </body>
    19.  
    20. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'bar',
    3. 'legend': {},
    4. 'series': [{
    5. 'values': [11, 26, 7, 44, 11]
    6. },
    7. {
    8. 'values': [42, 13, 21, 15, 33]
    9. }
    10. ]
    11. };
    12.  
    13. zingchart.resize = function(p) {
    14. zcdocs.demos.dump('resize', p);
    15. }
    16.  
    17.  
    18. zingchart.render({
    19. id: 'demo-chart',
    20. data: myConfig,
    21. height: 400,
    22. width: '100%'
    23. });
    24.  
    25. demo1.addEventListener('click', function() {
    26. zingchart.exec('demo-chart', 'resize', {
    27. 'width': zcdocs.utils.rvalue(300, 450),
    28. 'height': zcdocs.utils.rvalue(150, 250)
    29. });
    30. });
    31. reset.addEventListener('click', function() {
    32. zingchart.exec('demo-chart', 'resize', {
    33. 'width': 480,
    34. 'height': 300
    35. });
    36. });