• Edit
  • Download
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Blank Grid</title>
    7. <script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. <style>
    9. html,
    10. body {
    11. height: 100%;
    12. width: 100%;
    13. margin: 0;
    14. padding: 0;
    15. }
    16.  
    17. .chart--container {
    18. height: 100%;
    19. width: 100%;
    20. min-height: 150px;
    21. }
    22.  
    23. .zc-ref {
    24. display: none;
    25. }
    26. </style>
    27. </head>
    28.  
    29. <body>
    30. <!-- CHART CONTAINER -->
    31. <div id="myChart" class="chart--container">
    32. <a class="zc-ref" href="https://www.zingchart.com">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 myDashboard = {
    43. /* Graphset array */
    44. graphset: [{
    45. /* Object containing chart data */
    46. type: 'line',
    47. /* Size your chart using height/width attributes */
    48. height: '200px',
    49. width: '100%',
    50. /* Position your chart using x/y attributes */
    51. x: '5%',
    52. y: '5%',
    53. series: [{
    54. values: [76, 23, 15, 85, 13]
    55. },
    56. {
    57. values: [36, 53, 65, 25, 45]
    58. }
    59. ]
    60. },
    61. {
    62. /* Object containing chart data */
    63. type: 'funnel',
    64. height: '55%',
    65. width: '50%',
    66. x: '5%',
    67. y: '200px',
    68. series: [{
    69. values: [30]
    70. },
    71. {
    72. values: [15]
    73. },
    74. {
    75. values: [5]
    76. },
    77. {
    78. values: [3]
    79. }
    80. ]
    81. },
    82. {
    83. type: 'pie',
    84. height: '55%',
    85. width: '50%',
    86. x: '50%',
    87. y: '200px',
    88. series: [{
    89. values: [15]
    90. },
    91. {
    92. values: [30]
    93. },
    94. {
    95. values: [34]
    96. }
    97. ]
    98. }
    99. ]
    100. };
    101.  
    102.  
    103. // render chart with width and height to
    104. // fill the parent container CSS dimensions
    105. zingchart.render({
    106. id: 'myChart',
    107. data: myDashboard,
    108. height: '100%',
    109. width: '100%',
    110. });
    111. });
    112. </script>
    113. </body>
    114.  
    115. </html>
    1. <!DOCTYPE html>
    2. <html>
    3.  
    4. <head>
    5. <meta charset="utf-8">
    6. <title>ZingGrid: Blank Grid</title>
    7. <script src="https://cdn.zingchart.com/zingchart.min.js"></script>
    8. </head>
    9.  
    10. <body>
    11. <!-- CHART CONTAINER -->
    12. <div id="myChart" class="chart--container">
    13. <a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a>
    14. </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. .chart--container {
    10. height: 100%;
    11. width: 100%;
    12. min-height: 150px;
    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 myDashboard = {
    9. /* Graphset array */
    10. graphset: [{
    11. /* Object containing chart data */
    12. type: 'line',
    13. /* Size your chart using height/width attributes */
    14. height: '200px',
    15. width: '100%',
    16. /* Position your chart using x/y attributes */
    17. x: '5%',
    18. y: '5%',
    19. series: [{
    20. values: [76, 23, 15, 85, 13]
    21. },
    22. {
    23. values: [36, 53, 65, 25, 45]
    24. }
    25. ]
    26. },
    27. {
    28. /* Object containing chart data */
    29. type: 'funnel',
    30. height: '55%',
    31. width: '50%',
    32. x: '5%',
    33. y: '200px',
    34. series: [{
    35. values: [30]
    36. },
    37. {
    38. values: [15]
    39. },
    40. {
    41. values: [5]
    42. },
    43. {
    44. values: [3]
    45. }
    46. ]
    47. },
    48. {
    49. type: 'pie',
    50. height: '55%',
    51. width: '50%',
    52. x: '50%',
    53. y: '200px',
    54. series: [{
    55. values: [15]
    56. },
    57. {
    58. values: [30]
    59. },
    60. {
    61. values: [34]
    62. }
    63. ]
    64. }
    65. ]
    66. };
    67.  
    68.  
    69. // render chart with width and height to
    70. // fill the parent container CSS dimensions
    71. zingchart.render({
    72. id: 'myChart',
    73. data: myDashboard,
    74. height: '100%',
    75. width: '100%',
    76. });
    77. });