• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html class="zc-html">
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <style>
    9. .zc-html,
    10. .zc-body {
    11. margin: 0;
    12. padding: 0;
    13. width: 100%;
    14. height: 100%;
    15. }
    16.  
    17. .chart--container {
    18. height: 100%;
    19. width: 100%;
    20. min-height: 530px;
    21. }
    22.  
    23. .zc-ref {
    24. display: none;
    25. }
    26. </style>
    27. </head>
    28.  
    29. <body class="zc-body">
    30. <!-- CHART CONTAINER -->
    31. <div id="myChart" class="chart--container">
    32. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    33. </div>
    34. <script>
    35. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // window:load event for Javascript to run after HTML
    36. // because this Javascript is injected into the document head
    37. window.addEventListener('load', () => {
    38. // Javascript code to execute after DOM content
    39.  
    40. // full ZingChart schema can be found here:
    41. // https://www.zingchart.com/docs/api/json-configuration/
    42. let chartConfig = {
    43. type: 'bar',
    44. globals: {
    45. fontSize: '14px'
    46. },
    47. // plot represents general series, or plots, styling
    48. plot: {
    49. decimals: 5,
    50. // hoverstate
    51. tooltip: {
    52. // set decimal place to 4 (more precision in tooltip)
    53. decimals: 4,
    54. // % symbol represents a token to insert a value. Full list here:
    55. // https://www.zingchart.com/docs/tutorials/chart-elements/zingchart-tokens/
    56. text: '%v',
    57. borderRadius: '3px',
    58. // htmlMode renders text attribute as html so
    59. // &deg; is rendered
    60. htmlMode: true
    61. },
    62. valueBox: {
    63. color: '#fff',
    64. placement: 'top-in'
    65. },
    66. // animation docs here:
    67. // https://www.zingchart.com/docs/tutorials/design-and-styling/chart-animation/#animation__effect
    68. animation: {
    69. effect: 'ANIMATION_EXPAND_BOTTOM',
    70. method: 'ANIMATION_STRONG_EASE_OUT',
    71. sequence: 'ANIMATION_BY_NODE',
    72. speed: 275
    73. }
    74. },
    75. // plot values
    76. series: [{
    77. // Set decimal place to 2 for displaying data on bars
    78. decimals: 2,
    79. values: [23.16373, 20.53461, 27.3670, 29.25498, 25.35467, 17.56438, 15.59788]
    80. },
    81. {
    82. values: [23.16373, 20.53461, 27.3670, 29.25498, 25.35467, 17.56438, 15.59788]
    83. }
    84. ]
    85. };
    86.  
    87. // render chart
    88. zingchart.render({
    89. id: 'myChart',
    90. data: chartConfig,
    91. height: '100%',
    92. width: '100%',
    93. });
    94. });
    95. </script>
    96. </body>
    97.  
    98. </html>
    1. <!DOCTYPE html>
    2. <html class="zc-html">
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingSoft Demo</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. </head>
    9.  
    10. <body class="zc-body">
    11. <!-- CHART CONTAINER -->
    12. <div id="myChart" class="chart--container">
    13. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    14. </div>
    15. </body>
    16.  
    17. </html>
    1. .zc-html,
    2. .zc-body {
    3. margin: 0;
    4. padding: 0;
    5. width: 100%;
    6. height: 100%;
    7. }
    8.  
    9. .chart--container {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 530px;
    13. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. // window:load event for Javascript to run after HTML
    2. // because this Javascript is injected into the document head
    3. window.addEventListener('load', () => {
    4. // Javascript code to execute after DOM content
    5.  
    6. // full ZingChart schema can be found here:
    7. // https://www.zingchart.com/docs/api/json-configuration/
    8. let chartConfig = {
    9. type: 'bar',
    10. globals: {
    11. fontSize: '14px'
    12. },
    13. // plot represents general series, or plots, styling
    14. plot: {
    15. decimals: 5,
    16. // hoverstate
    17. tooltip: {
    18. // set decimal place to 4 (more precision in tooltip)
    19. decimals: 4,
    20. // % symbol represents a token to insert a value. Full list here:
    21. // https://www.zingchart.com/docs/tutorials/chart-elements/zingchart-tokens/
    22. text: '%v',
    23. borderRadius: '3px',
    24. // htmlMode renders text attribute as html so
    25. // &deg; is rendered
    26. htmlMode: true
    27. },
    28. valueBox: {
    29. color: '#fff',
    30. placement: 'top-in'
    31. },
    32. // animation docs here:
    33. // https://www.zingchart.com/docs/tutorials/design-and-styling/chart-animation/#animation__effect
    34. animation: {
    35. effect: 'ANIMATION_EXPAND_BOTTOM',
    36. method: 'ANIMATION_STRONG_EASE_OUT',
    37. sequence: 'ANIMATION_BY_NODE',
    38. speed: 275
    39. }
    40. },
    41. // plot values
    42. series: [{
    43. // Set decimal place to 2 for displaying data on bars
    44. decimals: 2,
    45. values: [23.16373, 20.53461, 27.3670, 29.25498, 25.35467, 17.56438, 15.59788]
    46. },
    47. {
    48. values: [23.16373, 20.53461, 27.3670, 29.25498, 25.35467, 17.56438, 15.59788]
    49. }
    50. ]
    51. };
    52.  
    53. // render chart
    54. zingchart.render({
    55. id: 'myChart',
    56. data: chartConfig,
    57. height: '100%',
    58. width: '100%',
    59. });
    60. });