• 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. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. <style></style>
    11. </head>
    12.  
    13. <body>
    14. <div id='demo-chart'></div>
    15. <button class='btn btn-info' id='demo1'>Run Demo 1</button>
    16. <pre id='output'></pre>
    17. <script>
    18. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    19. var myConfig = {
    20. 'type': 'bar',
    21. 'plot': {
    22. 'selection-mode': 'multiple',
    23. 'background-mode': 'none',
    24. 'selected-state': {
    25. 'background-color': '#900 #f90',
    26. 'border-color': '#999',
    27. 'border-width': 1
    28. }
    29. },
    30. 'series': [{
    31. 'values': [11, 26, 7, 44, 11]
    32. },
    33. {
    34. 'values': [42, 13, 21, 15, 33]
    35. }
    36. ],
    37. 'selection': [
    38. [0, 1, 2, 3, 4],
    39. [0, 1, 2, 3, 4]
    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. let output = zingchart.exec('demo-chart', 'deselect', [{
    52. 'plotindex': 0,
    53. 'nodeindex': [0, 2]
    54. },
    55. {
    56. 'plotindex': 1,
    57. 'nodeindex': '1-3'
    58. }
    59. ]);
    60. zcdocs.demos.dump('deselect', output);
    61. });
    62. </script>
    63. </body>
    64.  
    65. </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. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    10. </head>
    11.  
    12. <body>
    13. <div id='demo-chart'></div>
    14. <button class='btn btn-info' id='demo1'>Run Demo 1</button>
    15. <pre id='output'></pre>
    16. </body>
    17.  
    18. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'bar',
    3. 'plot': {
    4. 'selection-mode': 'multiple',
    5. 'background-mode': 'none',
    6. 'selected-state': {
    7. 'background-color': '#900 #f90',
    8. 'border-color': '#999',
    9. 'border-width': 1
    10. }
    11. },
    12. 'series': [{
    13. 'values': [11, 26, 7, 44, 11]
    14. },
    15. {
    16. 'values': [42, 13, 21, 15, 33]
    17. }
    18. ],
    19. 'selection': [
    20. [0, 1, 2, 3, 4],
    21. [0, 1, 2, 3, 4]
    22. ]
    23. };
    24.  
    25. zingchart.render({
    26. id: 'demo-chart',
    27. data: myConfig,
    28. height: 400,
    29. width: '100%'
    30. });
    31.  
    32. demo1.addEventListener('click', function() {
    33. let output = zingchart.exec('demo-chart', 'deselect', [{
    34. 'plotindex': 0,
    35. 'nodeindex': [0, 2]
    36. },
    37. {
    38. 'plotindex': 1,
    39. 'nodeindex': '1-3'
    40. }
    41. ]);
    42. zcdocs.demos.dump('deselect', output);
    43. });