• 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></style>
    13. </head>
    14.  
    15. <body>
    16. <div id='demo-chart'></div>
    17. <button class='btn btn-info' id='demo1'>Demo 1</button>
    18. <button class='btn btn-info' id='demo2'>Demo 2</button>
    19. <pre id='output'></pre>
    20. <script>
    21. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    22. var myConfig = {
    23. 'type': 'line',
    24. 'no-data': {
    25. text: 'Removed all plots!'
    26. },
    27. 'series': [{
    28. 'values': [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    29. id: 'test'
    30. },
    31. {
    32. 'values': [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48]
    33. },
    34. {
    35. 'values': [42, 43, 30, 40, 31, 48, 55, 46, 48, 32, 38, 38]
    36. },
    37. {
    38. 'values': [25, 15, 26, 21, 24, 26, 33, 25, 15, 25, 22, 24]
    39. }
    40. ]
    41. };
    42.  
    43. zingchart.render({
    44. id: 'demo-chart',
    45. data: myConfig,
    46. height: 400,
    47. width: '100%'
    48. });
    49.  
    50. demo1.addEventListener('click', function() {
    51. zingchart.exec('demo-chart', 'removeplot', {
    52. plotid: 'test',
    53. data: {
    54. plotindex: 0
    55. }
    56. });
    57. });
    58.  
    59. demo2.addEventListener('click', function() {
    60. zingchart.exec('demo-chart', 'removeplot', {
    61. data: {
    62. plotindex: 0
    63. }
    64. });
    65. });
    66. </script>
    67. </body>
    68.  
    69. </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. <pre id='output'></pre>
    19. </body>
    20.  
    21. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'line',
    3. 'no-data': {
    4. text: 'Removed all plots!'
    5. },
    6. 'series': [{
    7. 'values': [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    8. id: 'test'
    9. },
    10. {
    11. 'values': [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48]
    12. },
    13. {
    14. 'values': [42, 43, 30, 40, 31, 48, 55, 46, 48, 32, 38, 38]
    15. },
    16. {
    17. 'values': [25, 15, 26, 21, 24, 26, 33, 25, 15, 25, 22, 24]
    18. }
    19. ]
    20. };
    21.  
    22. zingchart.render({
    23. id: 'demo-chart',
    24. data: myConfig,
    25. height: 400,
    26. width: '100%'
    27. });
    28.  
    29. demo1.addEventListener('click', function() {
    30. zingchart.exec('demo-chart', 'removeplot', {
    31. plotid: 'test',
    32. data: {
    33. plotindex: 0
    34. }
    35. });
    36. });
    37.  
    38. demo2.addEventListener('click', function() {
    39. zingchart.exec('demo-chart', 'removeplot', {
    40. data: {
    41. plotindex: 0
    42. }
    43. });
    44. });