• 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.  
    11. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    12. <style></style>
    13. </head>
    14.  
    15. <body>
    16. <div id='demo-chart'></div>
    17. <pre id='htmlOutput'></pre>
    18. <script>
    19. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    20. var myConfig = {
    21. graphset: [{
    22. type: 'bar',
    23. title: {
    24. text: 'Click on Chart'
    25. },
    26. series: [{
    27. values: [34, 67, 42, 89, 25, 34, 67, ]
    28. },
    29. {
    30. values: [35, 42, 89, 25, 34, 67, 85]
    31. }
    32. ]
    33. }, ]
    34. };
    35.  
    36. zingchart.bind(null, 'click', function(e) {
    37. if (e.target != 'none' && e.target != 'node') {
    38. return;
    39. }
    40.  
    41. let output = zingchart.exec('demo-chart', 'getxyinfo', {
    42. x: e.x,
    43. y: e.y
    44. });
    45.  
    46. htmlOutput.textContent = JSON.stringify(output, null, 4);
    47. });
    48.  
    49. zingchart.render({
    50. id: 'demo-chart',
    51. data: myConfig,
    52. height: 400,
    53. width: '100%'
    54. });
    55. </script>
    56. </body>
    57.  
    58. </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.  
    11. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    12. </head>
    13.  
    14. <body>
    15. <div id='demo-chart'></div>
    16. <pre id='htmlOutput'></pre>
    17. </body>
    18.  
    19. </html>
    1.  
    1. var myConfig = {
    2. graphset: [{
    3. type: 'bar',
    4. title: {
    5. text: 'Click on Chart'
    6. },
    7. series: [{
    8. values: [34, 67, 42, 89, 25, 34, 67, ]
    9. },
    10. {
    11. values: [35, 42, 89, 25, 34, 67, 85]
    12. }
    13. ]
    14. }, ]
    15. };
    16.  
    17. zingchart.bind(null, 'click', function(e) {
    18. if (e.target != 'none' && e.target != 'node') {
    19. return;
    20. }
    21.  
    22. let output = zingchart.exec('demo-chart', 'getxyinfo', {
    23. x: e.x,
    24. y: e.y
    25. });
    26.  
    27. htmlOutput.textContent = JSON.stringify(output, null, 4);
    28. });
    29.  
    30. zingchart.render({
    31. id: 'demo-chart',
    32. data: myConfig,
    33. height: 400,
    34. width: '100%'
    35. });