• 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: 100%;
    20. width: 100%;
    21. min-height: 150px;
    22. }
    23.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <button id="demo1">Btn 1</button>
    32. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    33. <script>
    34. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    35. var myConfig = {
    36. 'type': 'line',
    37. 'series': [{
    38. "id": 'series1',
    39. 'visible': true,
    40. 'line-color': 'yellow',
    41. 'values': [11, 26, 7, 44, 19]
    42. },
    43. {
    44. "id": 'series2',
    45. 'visible': true,
    46. 'line-color': 'red',
    47. 'values': [18, 12, 27, 34, 21]
    48. }
    49. ],
    50. legend: {
    51. toggleAction: 'remove'
    52. },
    53. preview: {}
    54. };
    55.  
    56. zingchart.render({
    57. id: 'myChart',
    58. data: myConfig,
    59. height: 400,
    60. width: '100%'
    61. });
    62.  
    63. $('#demo1').bind('click', function() {
    64. zingchart.exec('myChart', 'modifyplot', {
    65. 'update': true,
    66. 'plotid': 'series2',
    67. 'data': {
    68. visible: false
    69. }
    70. });
    71.  
    72. zingchart.exec('myChart', 'reload');
    73. });
    74. </script>
    75. </body>
    76.  
    77. </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. <button id="demo1">Btn 1</button>
    13. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    14. </body>
    15.  
    16. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. var myConfig = {
    2. 'type': 'line',
    3. 'series': [{
    4. "id": 'series1',
    5. 'visible': true,
    6. 'line-color': 'yellow',
    7. 'values': [11, 26, 7, 44, 19]
    8. },
    9. {
    10. "id": 'series2',
    11. 'visible': true,
    12. 'line-color': 'red',
    13. 'values': [18, 12, 27, 34, 21]
    14. }
    15. ],
    16. legend: {
    17. toggleAction: 'remove'
    18. },
    19. preview: {}
    20. };
    21.  
    22. zingchart.render({
    23. id: 'myChart',
    24. data: myConfig,
    25. height: 400,
    26. width: '100%'
    27. });
    28.  
    29. $('#demo1').bind('click', function() {
    30. zingchart.exec('myChart', 'modifyplot', {
    31. 'update': true,
    32. 'plotid': 'series2',
    33. 'data': {
    34. visible: false
    35. }
    36. });
    37.  
    38. zingchart.exec('myChart', 'reload');
    39. });