• 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. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    32. <script>
    33. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    34. var myConfig = {
    35. type: 'bar',
    36. title: {
    37. text: 'Click Me',
    38. flat: false, // flat false overlaps the click event listner for the below label
    39. url: 'https://www.zingchart.com',
    40. target: '_blank',
    41. width: 300,
    42. marginLeft: 'auto', // if we center title it is ok
    43. marginRight: 'auto' // if we center title it is ok
    44. },
    45. labels: [{
    46. text: 'Test Label',
    47. fontSize: 16,
    48. url: 'https://www.zingchart.com',
    49. target: '_blank'
    50. }],
    51. series: [{
    52. values: [35, 42, 67, 89, 25, 34, 67, 85]
    53. }]
    54. };
    55.  
    56. zingchart.bind(null, 'label_click', function(e) {
    57. console.log(e);
    58. });
    59.  
    60. zingchart.render({
    61. id: 'myChart',
    62. data: myConfig,
    63. height: '100%',
    64. width: '100%'
    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"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    13. </body>
    14.  
    15. </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. title: {
    4. text: 'Click Me',
    5. flat: false, // flat false overlaps the click event listner for the below label
    6. url: 'https://www.zingchart.com',
    7. target: '_blank',
    8. width: 300,
    9. marginLeft: 'auto', // if we center title it is ok
    10. marginRight: 'auto' // if we center title it is ok
    11. },
    12. labels: [{
    13. text: 'Test Label',
    14. fontSize: 16,
    15. url: 'https://www.zingchart.com',
    16. target: '_blank'
    17. }],
    18. series: [{
    19. values: [35, 42, 67, 89, 25, 34, 67, 85]
    20. }]
    21. };
    22.  
    23. zingchart.bind(null, 'label_click', function(e) {
    24. console.log(e);
    25. });
    26.  
    27. zingchart.render({
    28. id: 'myChart',
    29. data: myConfig,
    30. height: '100%',
    31. width: '100%'
    32. });