• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style>
    10. html,
    11. body {
    12. height: 100%;
    13. width: 100%;
    14. margin: 0;
    15. padding: 0;
    16. }
    17.  
    18. #myChart {
    19. height: 500;
    20. width: 500;
    21. min-height: 150px;
    22. }
    23.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <div id="myChartBar"></div>
    32.  
    33. <div id="myChartLine"></div>
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    36. var myConfigBar = {
    37. type: 'bar',
    38. series: [{
    39. values: [35, 42, 67, 89, 25, 34, 67, 85]
    40. }]
    41. };
    42.  
    43.  
    44. var myConfigLine = {
    45. type: 'line',
    46. series: [{
    47. values: [45, 42, 4, 89, 25, 34, 67, 35]
    48. }]
    49. };
    50.  
    51.  
    52. var count = 0;
    53.  
    54. zingchart.load = function(p) {
    55. count++;
    56. if (count === 2) {
    57. zingchart.exec('myChartBar', 'exportimage', {
    58. download: true,
    59. format: 'pdf',
    60. uid: 'myexport',
    61. page: '1/2'
    62. });
    63.  
    64. zingchart.exec('myChartLine', 'exportimage', {
    65. download: true,
    66. format: 'pdf',
    67. uid: 'myexport',
    68. page: '2/2'
    69. });
    70. }
    71. }
    72.  
    73. zingchart.render({
    74. id: 'myChartBar',
    75. data: myConfigBar,
    76. height: 500,
    77. width: '100%'
    78. });
    79.  
    80. zingchart.render({
    81. id: 'myChartLine',
    82. data: myConfigLine,
    83. height: 500,
    84. width: '100%'
    85. });
    86. </script>
    87. </body>
    88.  
    89. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <div id="myChartBar"></div>
    13.  
    14. <div id="myChartLine"></div>
    15. </body>
    16.  
    17. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 500;
    11. width: 500;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. var myConfigBar = {
    2. type: 'bar',
    3. series: [{
    4. values: [35, 42, 67, 89, 25, 34, 67, 85]
    5. }]
    6. };
    7.  
    8.  
    9. var myConfigLine = {
    10. type: 'line',
    11. series: [{
    12. values: [45, 42, 4, 89, 25, 34, 67, 35]
    13. }]
    14. };
    15.  
    16.  
    17. var count = 0;
    18.  
    19. zingchart.load = function(p) {
    20. count++;
    21. if (count === 2) {
    22. zingchart.exec('myChartBar', 'exportimage', {
    23. download: true,
    24. format: 'pdf',
    25. uid: 'myexport',
    26. page: '1/2'
    27. });
    28.  
    29. zingchart.exec('myChartLine', 'exportimage', {
    30. download: true,
    31. format: 'pdf',
    32. uid: 'myexport',
    33. page: '2/2'
    34. });
    35. }
    36. }
    37.  
    38. zingchart.render({
    39. id: 'myChartBar',
    40. data: myConfigBar,
    41. height: 500,
    42. width: '100%'
    43. });
    44.  
    45. zingchart.render({
    46. id: 'myChartLine',
    47. data: myConfigLine,
    48. height: 500,
    49. width: '100%'
    50. });