• 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></style>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <button id='displayContextMenu'>Display Menu</button>
    15. <script>
    16. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    17. var myConfig = {
    18. gui: {
    19. contextMenu: {
    20. backgroundColor: 'none',
    21. item: {
    22. backgroundColor: "#009688",
    23. fontColor: "#FFF",
    24. hoverState: {
    25. backgroundColor: "#00BFA5",
    26. fontColor: "#FFF"
    27. }
    28. }
    29. }
    30. },
    31. "graphset": [{
    32. "type": "scatter",
    33. "title": {
    34. "text": "Context Menu Styling"
    35. },
    36. "series": [{
    37. "values": [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    38. "text": "Apple"
    39. },
    40. {
    41. "values": [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48],
    42. "text": "Microsoft"
    43. },
    44. {
    45. "values": [42, 43, 30, 40, 31, 48, 55, 46, 48, 32, 38, 38],
    46. "text": "Oracle"
    47. },
    48. {
    49. "values": [25, 15, 26, 21, 24, 26, 33, 25, 15, 25, 22, 24],
    50. "text": "Dell"
    51. }
    52. ]
    53. }]
    54. };
    55.  
    56. zingchart.render({
    57. id: 'myChart',
    58. data: myConfig,
    59. height: 400,
    60. width: '100%'
    61. });
    62.  
    63. document.getElementById('displayContextMenu').addEventListener('click', function(p) {
    64. zingchart.exec('myChart', 'showmenu');
    65. });
    66. </script>
    67. </body>
    68.  
    69. </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. <div id='myChart'></div>
    13. <button id='displayContextMenu'>Display Menu</button>
    14. </body>
    15.  
    16. </html>
    1.  
    1. var myConfig = {
    2. gui: {
    3. contextMenu: {
    4. backgroundColor: 'none',
    5. item: {
    6. backgroundColor: "#009688",
    7. fontColor: "#FFF",
    8. hoverState: {
    9. backgroundColor: "#00BFA5",
    10. fontColor: "#FFF"
    11. }
    12. }
    13. }
    14. },
    15. "graphset": [{
    16. "type": "scatter",
    17. "title": {
    18. "text": "Context Menu Styling"
    19. },
    20. "series": [{
    21. "values": [69, 68, 54, 48, 70, 74, 98, 70, 72, 68, 49, 69],
    22. "text": "Apple"
    23. },
    24. {
    25. "values": [51, 53, 47, 60, 48, 52, 75, 52, 55, 47, 60, 48],
    26. "text": "Microsoft"
    27. },
    28. {
    29. "values": [42, 43, 30, 40, 31, 48, 55, 46, 48, 32, 38, 38],
    30. "text": "Oracle"
    31. },
    32. {
    33. "values": [25, 15, 26, 21, 24, 26, 33, 25, 15, 25, 22, 24],
    34. "text": "Dell"
    35. }
    36. ]
    37. }]
    38. };
    39.  
    40. zingchart.render({
    41. id: 'myChart',
    42. data: myConfig,
    43. height: 400,
    44. width: '100%'
    45. });
    46.  
    47. document.getElementById('displayContextMenu').addEventListener('click', function(p) {
    48. zingchart.exec('myChart', 'showmenu');
    49. });