• 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'>Run Demo 1</button>
    17. <pre id='output'></pre>
    18. <script>
    19. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    20. var myConfig = {
    21. 'type': 'bar',
    22. 'plot': {
    23. 'selection-mode': 'multiple',
    24. 'background-mode': 'none',
    25. 'selected-state': {
    26. 'background-color': '#900 #f90',
    27. 'border-color': '#999',
    28. 'border-width': 1
    29. }
    30. },
    31. 'series': [{
    32. 'values': [11, 26, 7, 44, 11]
    33. },
    34. {
    35. 'values': [42, 13, 21, 15, 33]
    36. }
    37. ],
    38. 'selection': [
    39. [0, 3],
    40. [2, 4]
    41. ]
    42. };
    43.  
    44. zingchart.render({
    45. id: 'demo-chart',
    46. data: myConfig,
    47. height: 350,
    48. width: '100%'
    49. });
    50.  
    51. demo1.addEventListener('click', function() {
    52. let output = zingchart.exec('demo-chart', 'getselection');
    53. zcdocs.demos.dump('getselection', JSON.stringify(output));
    54. });
    55. </script>
    56. </body>
    57.  
    58. </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'>Run Demo 1</button>
    16. <pre id='output'></pre>
    17. </body>
    18.  
    19. </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, 3],
    21. [2, 4]
    22. ]
    23. };
    24.  
    25. zingchart.render({
    26. id: 'demo-chart',
    27. data: myConfig,
    28. height: 350,
    29. width: '100%'
    30. });
    31.  
    32. demo1.addEventListener('click', function() {
    33. let output = zingchart.exec('demo-chart', 'getselection');
    34. zcdocs.demos.dump('getselection', JSON.stringify(output));
    35. });