• 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: 400px;
    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 class='btn btn-info' id='demo1'>Show Tooltip</button>
    32. <button class='btn btn-info' id='demo2'>Hide Tooltip</button>
    33. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    36. var myConfig = {
    37. type: 'line',
    38. tooltip: {
    39.  
    40. },
    41. series: [{
    42. values: [35, 42, 67, 89, 25, 34, 67, 85]
    43. }]
    44. };
    45.  
    46. zingchart.render({
    47. id: 'myChart',
    48. data: myConfig,
    49. height: 400,
    50. width: '100%'
    51. });
    52.  
    53. document.getElementById('demo1').addEventListener('click', function() {
    54. zingchart.exec('myChart', 'showtooltip', {
    55. plotindex: 0,
    56. nodeindex: 3
    57. });
    58. });
    59.  
    60. document.getElementById('demo2').addEventListener('click', function() {
    61. zingchart.exec('myChart', 'hidetooltip');
    62. });
    63. </script>
    64. </body>
    65.  
    66. </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 class='btn btn-info' id='demo1'>Show Tooltip</button>
    13. <button class='btn btn-info' id='demo2'>Hide Tooltip</button>
    14. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    15. </body>
    16.  
    17. </html>
    1. html,
    2. body {
    3. height: 100%;
    4. width: 100%;
    5. margin: 0;
    6. padding: 0;
    7. }
    8.  
    9. #myChart {
    10. height: 400px;
    11. width: 100%;
    12. min-height: 150px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. var myConfig = {
    2. type: 'line',
    3. tooltip: {
    4.  
    5. },
    6. series: [{
    7. values: [35, 42, 67, 89, 25, 34, 67, 85]
    8. }]
    9. };
    10.  
    11. zingchart.render({
    12. id: 'myChart',
    13. data: myConfig,
    14. height: 400,
    15. width: '100%'
    16. });
    17.  
    18. document.getElementById('demo1').addEventListener('click', function() {
    19. zingchart.exec('myChart', 'showtooltip', {
    20. plotindex: 0,
    21. nodeindex: 3
    22. });
    23. });
    24.  
    25. document.getElementById('demo2').addEventListener('click', function() {
    26. zingchart.exec('myChart', 'hidetooltip');
    27. });