• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. <style>
    10. html,
    11. body {
    12. height: 100%;
    13. width: 100%;
    14. margin: 0;
    15. padding: 0;
    16. }
    17.  
    18. #myChart {
    19. height: 100%;
    20. width: 100%;
    21. min-height: 150px;
    22. }
    23.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <button onClick="showMenu()">Show Menu</button>
    32. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    33. <script>
    34. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    35. var myConfig = {
    36. type: 'bar',
    37. series: [{
    38. values: [35, 42, 67, 89, 25, 34, 67, 85]
    39. }]
    40. };
    41.  
    42. /* return false to stop right click contextmenu */
    43. zingchart.bind('myChart', 'contextmenu', function(e) {
    44. return false;
    45. });
    46.  
    47. /* still should trigger the contextmenu */
    48. window.showMenu = function(e) {
    49. zingchart.exec('myChart', 'showmenu', {
    50. x: 10,
    51. y: 20
    52. });
    53. }
    54.  
    55. zingchart.render({
    56. id: 'myChart',
    57. data: myConfig,
    58. height: '100%',
    59. width: '100%'
    60. });
    61. </script>
    62. </body>
    63.  
    64. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7.  
    8. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    9. </head>
    10.  
    11. <body>
    12. <button onClick="showMenu()">Show Menu</button>
    13. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    14. </body>
    15.  
    16. </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. }
    1. var myConfig = {
    2. type: 'bar',
    3. series: [{
    4. values: [35, 42, 67, 89, 25, 34, 67, 85]
    5. }]
    6. };
    7.  
    8. /* return false to stop right click contextmenu */
    9. zingchart.bind('myChart', 'contextmenu', function(e) {
    10. return false;
    11. });
    12.  
    13. /* still should trigger the contextmenu */
    14. window.showMenu = function(e) {
    15. zingchart.exec('myChart', 'showmenu', {
    16. x: 10,
    17. y: 20
    18. });
    19. }
    20.  
    21. zingchart.render({
    22. id: 'myChart',
    23. data: myConfig,
    24. height: '100%',
    25. width: '100%'
    26. });