• 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. 'legend': {},
    25. 'series': [{
    26. 'values': [11, 26, 7, 44, 19]
    27. },
    28. {
    29. 'values': [42, 13, 21, 15, 33]
    30. }
    31. ]
    32. };
    33.  
    34. zingchart.render({
    35. id: 'demo-chart',
    36. data: myConfig,
    37. height: 400,
    38. width: '100%'
    39. });
    40.  
    41. demo1.addEventListener('click', function() {
    42. zingchart.exec('demo-chart', 'setseriesdata', {
    43. 'plotindex': 1,
    44. 'data': {
    45. 'values': zcdocs.utils.rvalues(5, 0, 50),
    46. 'line-color': zcdocs.utils.rcolor()
    47. }
    48. });
    49. });
    50. demo2.addEventListener('click', function() {
    51. zingchart.exec('demo-chart', 'setseriesdata', {
    52. // generate random values and colors
    53. 'data': [{
    54. 'values': zcdocs.utils.rvalues(5, 0, 50),
    55. 'line-color': zcdocs.utils.rcolor()
    56. }, {
    57. 'values': zcdocs.utils.rvalues(5, 0, 50),
    58. 'line-color': zcdocs.utils.rcolor()
    59. }]
    60. });
    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.  
    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. 'legend': {},
    4. 'series': [{
    5. 'values': [11, 26, 7, 44, 19]
    6. },
    7. {
    8. 'values': [42, 13, 21, 15, 33]
    9. }
    10. ]
    11. };
    12.  
    13. zingchart.render({
    14. id: 'demo-chart',
    15. data: myConfig,
    16. height: 400,
    17. width: '100%'
    18. });
    19.  
    20. demo1.addEventListener('click', function() {
    21. zingchart.exec('demo-chart', 'setseriesdata', {
    22. 'plotindex': 1,
    23. 'data': {
    24. 'values': zcdocs.utils.rvalues(5, 0, 50),
    25. 'line-color': zcdocs.utils.rcolor()
    26. }
    27. });
    28. });
    29. demo2.addEventListener('click', function() {
    30. zingchart.exec('demo-chart', 'setseriesdata', {
    31. // generate random values and colors
    32. 'data': [{
    33. 'values': zcdocs.utils.rvalues(5, 0, 50),
    34. 'line-color': zcdocs.utils.rcolor()
    35. }, {
    36. 'values': zcdocs.utils.rvalues(5, 0, 50),
    37. 'line-color': zcdocs.utils.rcolor()
    38. }]
    39. });
    40. });