• 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'>Hide</button>
    17. <button class='btn btn-info' id='demo2'>Show</button>
    18. <pre id='output'></pre>
    19. <script>
    20. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    21. var myConfig = {
    22. 'type': 'line',
    23. 'series': [{
    24. 'values': [11, 26, 7, 44, 19]
    25. },
    26. {
    27. 'values': [62, 13, 21, 15, 33]
    28. }
    29. ]
    30. };
    31.  
    32. zingchart.render({
    33. id: 'demo-chart',
    34. data: myConfig,
    35. height: 400,
    36. width: '100%'
    37. });
    38.  
    39. demo1.addEventListener('click', function() {
    40. let output = zingchart.exec('demo-chart', 'hideplot', {
    41. 'plotindex': 1,
    42. 'toggle-action': 'remove' //toggleAction (CamelCase not supported here), only css style
    43. });
    44. zcdocs.demos.dump('hideplot', output);
    45. });
    46.  
    47. demo2.addEventListener('click', function() {
    48. let output = zingchart.exec('demo-chart', 'showplot', {
    49. 'plotindex': 1,
    50. 'toggle-action': 'remove' //toggle-action must be the same for show
    51. });
    52. zcdocs.demos.dump('showplot', output);
    53. });
    54. </script>
    55. </body>
    56.  
    57. </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'>Hide</button>
    16. <button class='btn btn-info' id='demo2'>Show</button>
    17. <pre id='output'></pre>
    18. </body>
    19.  
    20. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'line',
    3. 'series': [{
    4. 'values': [11, 26, 7, 44, 19]
    5. },
    6. {
    7. 'values': [62, 13, 21, 15, 33]
    8. }
    9. ]
    10. };
    11.  
    12. zingchart.render({
    13. id: 'demo-chart',
    14. data: myConfig,
    15. height: 400,
    16. width: '100%'
    17. });
    18.  
    19. demo1.addEventListener('click', function() {
    20. let output = zingchart.exec('demo-chart', 'hideplot', {
    21. 'plotindex': 1,
    22. 'toggle-action': 'remove' //toggleAction (CamelCase not supported here), only css style
    23. });
    24. zcdocs.demos.dump('hideplot', output);
    25. });
    26.  
    27. demo2.addEventListener('click', function() {
    28. let output = zingchart.exec('demo-chart', 'showplot', {
    29. 'plotindex': 1,
    30. 'toggle-action': 'remove' //toggle-action must be the same for show
    31. });
    32. zcdocs.demos.dump('showplot', output);
    33. });