• 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='//code.jquery.com/jquery-2.1.4.min.js'></script>
    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'>Run Demo 1</button>
    18. <pre id='output'></pre>
    19. <script>
    20. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    21. var myConfig = {
    22. 'type': 'bar',
    23. 'title': {
    24. 'text': 'Chart title'
    25. },
    26. 'series': [{
    27. 'values': [11, 26, 7, 44, 11]
    28. },
    29. {
    30. 'values': [42, 13, 21, 15, 33]
    31. }
    32. ]
    33. };
    34. zingchart.render({
    35. id: 'demo-chart',
    36. data: myConfig,
    37. height: 400,
    38. width: '100%'
    39. });
    40. zingchart.modify = function(p) {
    41. zcdocs.demos.dump('modify', p);
    42. }
    43. $('#demo1').bind('click', function() {
    44. zingchart.exec('demo-chart', 'modify', {
    45. 'object': 'title',
    46. 'data': {
    47. 'text': 'A new title'
    48. }
    49. });
    50. });
    51. </script>
    52. </body>
    53.  
    54. </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='//code.jquery.com/jquery-2.1.4.min.js'></script>
    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'>Run Demo 1</button>
    17. <pre id='output'></pre>
    18. </body>
    19.  
    20. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'bar',
    3. 'title': {
    4. 'text': 'Chart title'
    5. },
    6. 'series': [{
    7. 'values': [11, 26, 7, 44, 11]
    8. },
    9. {
    10. 'values': [42, 13, 21, 15, 33]
    11. }
    12. ]
    13. };
    14. zingchart.render({
    15. id: 'demo-chart',
    16. data: myConfig,
    17. height: 400,
    18. width: '100%'
    19. });
    20. zingchart.modify = function(p) {
    21. zcdocs.demos.dump('modify', p);
    22. }
    23. $('#demo1').bind('click', function() {
    24. zingchart.exec('demo-chart', 'modify', {
    25. 'object': 'title',
    26. 'data': {
    27. 'text': 'A new title'
    28. }
    29. });
    30. });