• 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>
    13. #displayEvents {
    14. word-wrap: break-word;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <div id='demo-chart'></div>
    21. <button class='btn btn-info' id="demo1">Demo 1</button>
    22. <button class='btn btn-info' id="demo2">Demo 2</button>
    23. <div id="displayEvents">
    24. <p id="output">&nbsp;</p>
    25.  
    26. </div>
    27. <script>
    28. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    29. var myConfig = {
    30. graphset: [{
    31. type: "area",
    32. title: {
    33. text: 'Download XLS'
    34. },
    35. plot: {
    36. stacked: true
    37. },
    38. series: [{
    39. values: [35, 42, 67, 89, 25, 34, 67, 85]
    40. },
    41. {
    42. values: [35, 42, 67, 89, 25, 34, 67, 85]
    43. }
    44. ]
    45. }, ]
    46. };
    47.  
    48. zingchart.render({
    49. id: 'demo-chart',
    50. data: myConfig,
    51. height: 400,
    52. width: '100%',
    53. });
    54.  
    55. demo1.addEventListener('click', function() {
    56. var dump = zingchart.exec('demo-chart', 'downloadXLS');
    57. document.getElementById('output').innerHTML = dump;
    58. });
    59. demo2.addEventListener('click', function() {
    60. var dump = zingchart.exec('demo-chart', 'downloadXLS', {
    61. fn: 'test-filename'
    62. });
    63. document.getElementById('output').innerHTML = dump;
    64. });
    65. </script>
    66. </body>
    67.  
    68. </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">Demo 1</button>
    17. <button class='btn btn-info' id="demo2">Demo 2</button>
    18. <div id="displayEvents">
    19. <p id="output">&nbsp;</p>
    20.  
    21. </div>
    22. </body>
    23.  
    24. </html>
    1. #displayEvents {
    2. word-wrap: break-word;
    3. }
    1. var myConfig = {
    2. graphset: [{
    3. type: "area",
    4. title: {
    5. text: 'Download XLS'
    6. },
    7. plot: {
    8. stacked: true
    9. },
    10. series: [{
    11. values: [35, 42, 67, 89, 25, 34, 67, 85]
    12. },
    13. {
    14. values: [35, 42, 67, 89, 25, 34, 67, 85]
    15. }
    16. ]
    17. }, ]
    18. };
    19.  
    20. zingchart.render({
    21. id: 'demo-chart',
    22. data: myConfig,
    23. height: 400,
    24. width: '100%',
    25. });
    26.  
    27. demo1.addEventListener('click', function() {
    28. var dump = zingchart.exec('demo-chart', 'downloadXLS');
    29. document.getElementById('output').innerHTML = dump;
    30. });
    31. demo2.addEventListener('click', function() {
    32. var dump = zingchart.exec('demo-chart', 'downloadXLS', {
    33. fn: 'test-filename'
    34. });
    35. document.getElementById('output').innerHTML = dump;
    36. });