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