• 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="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <script nonce="undefined">
    9. zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";
    10. ZC.LICENSE = ["b55b025e438fa8a98e32482b5f768ff5"];
    11. </script>
    12. <style>
    13. html,
    14. body {
    15. height: 100%;
    16. width: 100%;
    17. margin: 0;
    18. padding: 0;
    19. }
    20.  
    21. #myChart {
    22. height: 100%;
    23. width: 100%;
    24. min-height: 150px;
    25. }
    26.  
    27. .zc-ref {
    28. display: none;
    29. }
    30.  
    31. .zc-menu-item {
    32. font-family: "Lucida Sans Unicode" !important;
    33. }
    34. </style>
    35. </head>
    36.  
    37. <body>
    38. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    39. <script>
    40. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    41. var myConfig = {
    42. "globals": {
    43. "fontFamily": "Lucida Sans Unicode"
    44. },
    45. "gui": {
    46. "context-menu": {
    47. "separator": {
    48. "line-color": "#ccc"
    49. },
    50. "custom-items": [{
    51. "id": "cm-demo",
    52. "text": "View demo Info",
    53. "enabled": "contextMenuCtrl"
    54. }, ]
    55. }
    56. },
    57. "type": "bar",
    58. "title": {
    59. "text": "Average Metric"
    60. },
    61. "plotarea": {
    62.  
    63. },
    64. "scaleX": {
    65.  
    66. },
    67. "scaleY": {
    68.  
    69. },
    70. "legend": {},
    71. "plot": {},
    72. "series": [{
    73. "values": [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    74. "text": "Apple"
    75. },
    76. {
    77. "values": [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48],
    78. "text": "Microsoft"
    79. }
    80. ]
    81. };
    82.  
    83. window.contextMenuCtrl = function(oInfo, sMenuId) {
    84. var bEnabled = false;
    85. if (sMenuId === 'cm-demo' && oInfo.target && oInfo.target === 'node') {
    86. bEnabled = true;
    87. }
    88. return bEnabled;
    89. }
    90.  
    91.  
    92. zingchart.render({
    93. id: 'myChart',
    94. data: myConfig,
    95. height: '100%',
    96. width: '100%'
    97. });
    98. </script>
    99. </body>
    100.  
    101. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <script>
    9. zingchart.MODULESDIR = "https://cdn.zingchart.com/modules/";
    10. ZC.LICENSE = ["b55b025e438fa8a98e32482b5f768ff5"];
    11. </script>
    12. </head>
    13.  
    14. <body>
    15. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    16. </body>
    17.  
    18. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    18.  
    19. .zc-menu-item {
    20. font-family: "Lucida Sans Unicode" !important;
    21. }
    1. var myConfig = {
    2. "globals": {
    3. "fontFamily": "Lucida Sans Unicode"
    4. },
    5. "gui": {
    6. "context-menu": {
    7. "separator": {
    8. "line-color": "#ccc"
    9. },
    10. "custom-items": [{
    11. "id": "cm-demo",
    12. "text": "View demo Info",
    13. "enabled": "contextMenuCtrl"
    14. }, ]
    15. }
    16. },
    17. "type": "bar",
    18. "title": {
    19. "text": "Average Metric"
    20. },
    21. "plotarea": {
    22.  
    23. },
    24. "scaleX": {
    25.  
    26. },
    27. "scaleY": {
    28.  
    29. },
    30. "legend": {},
    31. "plot": {},
    32. "series": [{
    33. "values": [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    34. "text": "Apple"
    35. },
    36. {
    37. "values": [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48],
    38. "text": "Microsoft"
    39. }
    40. ]
    41. };
    42.  
    43. window.contextMenuCtrl = function(oInfo, sMenuId) {
    44. var bEnabled = false;
    45. if (sMenuId === 'cm-demo' && oInfo.target && oInfo.target === 'node') {
    46. bEnabled = true;
    47. }
    48. return bEnabled;
    49. }
    50.  
    51.  
    52. zingchart.render({
    53. id: 'myChart',
    54. data: myConfig,
    55. height: '100%',
    56. width: '100%'
    57. });