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