• 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'>SetGuide 1</button>
    17. <button class='btn btn-info' id='demo2'>SetGuide 2</button>
    18. <button class='btn btn-info' id='demo3'>Reset Guides</button>
    19. <pre id='output'></pre>
    20. <script>
    21. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    22. var myConfig = {
    23. 'type': 'line',
    24. guide: {
    25.  
    26. },
    27. title: {
    28.  
    29. },
    30. 'series': [{
    31. 'values': [11, 26, 7, 44, 19]
    32. }]
    33. };
    34.  
    35. zingchart.render({
    36. id: 'demo-chart',
    37. data: myConfig,
    38. height: 400,
    39. width: '100%'
    40. });
    41.  
    42.  
    43. demo1.addEventListener('click', function() {
    44. let output = zingchart.exec('demo-chart', 'setguide', {
    45. graphid: 0,
    46. keyvalue: 1
    47. });
    48. zcdocs.demos.dump('setguide', output);
    49. });
    50. demo2.addEventListener('click', function() {
    51. let output = zingchart.exec('demo-chart', 'setguide', {
    52. keyvalue: 2
    53. });
    54. zcdocs.demos.dump('setguide', output);
    55. });
    56. demo3.addEventListener('click', function() {
    57. let output = zingchart.exec('demo-chart', 'resetguide');
    58. zcdocs.demos.dump('resetguide', output);
    59. });
    60. </script>
    61. </body>
    62.  
    63. </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'>SetGuide 1</button>
    16. <button class='btn btn-info' id='demo2'>SetGuide 2</button>
    17. <button class='btn btn-info' id='demo3'>Reset Guides</button>
    18. <pre id='output'></pre>
    19. </body>
    20.  
    21. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'line',
    3. guide: {
    4.  
    5. },
    6. title: {
    7.  
    8. },
    9. 'series': [{
    10. 'values': [11, 26, 7, 44, 19]
    11. }]
    12. };
    13.  
    14. zingchart.render({
    15. id: 'demo-chart',
    16. data: myConfig,
    17. height: 400,
    18. width: '100%'
    19. });
    20.  
    21.  
    22. demo1.addEventListener('click', function() {
    23. let output = zingchart.exec('demo-chart', 'setguide', {
    24. graphid: 0,
    25. keyvalue: 1
    26. });
    27. zcdocs.demos.dump('setguide', output);
    28. });
    29. demo2.addEventListener('click', function() {
    30. let output = zingchart.exec('demo-chart', 'setguide', {
    31. keyvalue: 2
    32. });
    33. zcdocs.demos.dump('setguide', output);
    34. });
    35. demo3.addEventListener('click', function() {
    36. let output = zingchart.exec('demo-chart', 'resetguide');
    37. zcdocs.demos.dump('resetguide', output);
    38. });