• 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.  
    17. <pre id='output'></pre>
    18. <script>
    19. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    20. var myConfig = {
    21. 'type': 'bar',
    22. 'title': {
    23. text: 'Click the shape'
    24. },
    25. 'shapes': [{
    26. 'x': 200,
    27. 'y': 50,
    28. 'height': 30,
    29. 'width': 130,
    30. 'type': 'rectangle',
    31. 'background-color': '#f90',
    32. 'padding': 5,
    33. 'border-width': 1,
    34. 'border-color': '#999',
    35. 'label': {
    36. 'text': 'Simple Shape'
    37. }
    38. }],
    39. 'series': [{
    40. 'values': [11, 26, 7, 44, 11]
    41. }]
    42. };
    43.  
    44. zingchart.bind('demo-chart', 'shape_click', function(e) {
    45. zcdocs.demos.dump('shape_click', e);
    46. });
    47.  
    48. zingchart.render({
    49. id: 'demo-chart',
    50. data: myConfig,
    51. height: 400,
    52. width: '100%'
    53. });
    54. </script>
    55. </body>
    56.  
    57. </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.  
    16. <pre id='output'></pre>
    17. </body>
    18.  
    19. </html>
    1.  
    1. var myConfig = {
    2. 'type': 'bar',
    3. 'title': {
    4. text: 'Click the shape'
    5. },
    6. 'shapes': [{
    7. 'x': 200,
    8. 'y': 50,
    9. 'height': 30,
    10. 'width': 130,
    11. 'type': 'rectangle',
    12. 'background-color': '#f90',
    13. 'padding': 5,
    14. 'border-width': 1,
    15. 'border-color': '#999',
    16. 'label': {
    17. 'text': 'Simple Shape'
    18. }
    19. }],
    20. 'series': [{
    21. 'values': [11, 26, 7, 44, 11]
    22. }]
    23. };
    24.  
    25. zingchart.bind('demo-chart', 'shape_click', function(e) {
    26. zcdocs.demos.dump('shape_click', e);
    27. });
    28.  
    29. zingchart.render({
    30. id: 'demo-chart',
    31. data: myConfig,
    32. height: 400,
    33. width: '100%'
    34. });