• 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-body {
    10. background-color: #fff;
    11. }
    12.  
    13. .chart--container {
    14. height: 100%;
    15. width: 100%;
    16. min-height: 530px;
    17. }
    18.  
    19. .zc-ref {
    20. display: none;
    21. }
    22. </style>
    23. </head>
    24.  
    25. <body class="zc-body">
    26. <div id="myChart" class="chart--container">
    27. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    28. </div>
    29.  
    30. <script>
    31. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"]; // CHART CONFIG
    32. // -----------------------------
    33. let chartConfig = {
    34. type: 'mixed',
    35. title: {
    36. text: 'Sample Burndown Chart',
    37. align: 'left',
    38. marginLeft: '23%',
    39. },
    40. legend: {
    41. adjustLayout: true,
    42. verticalAlign: 'middle',
    43. },
    44. scaleX: {
    45. labels: [
    46. 'Day 1',
    47. 'Day 2',
    48. 'Day 3',
    49. 'Day 4',
    50. 'Day 5',
    51. 'Day 6',
    52. 'Day 7',
    53. 'Day 8',
    54. ], // one label for every datapoint
    55. },
    56. scaleY: {
    57. guide: {
    58. // dashed lines
    59. visible: false,
    60. },
    61. label: {
    62. text: 'Remaing effort (hours)',
    63. fontSize: '14px',
    64. },
    65. },
    66. scaleY2: {
    67. label: {
    68. text: 'Remaing and completed tasks',
    69. fontSize: '14px',
    70. },
    71. maxValue: 100,
    72. minValue: 0,
    73. step: 25, // can define scale step values or default
    74. },
    75. crosshairX: {
    76. lineColor: '#424242',
    77. lineGapSize: '4px',
    78. lineStyle: 'dotted',
    79. plotLabel: {
    80. padding: '15px',
    81. backgroundColor: 'white',
    82. bold: true,
    83. borderColor: '#e3e3e3',
    84. borderRadius: '5px',
    85. fontColor: '#2f2f2f',
    86. fontFamily: 'Lato',
    87. fontSize: '12px',
    88. shadow: true,
    89. shadowAlpha: 0.2,
    90. shadowBlur: 5,
    91. shadowColor: '#a1a1a1',
    92. shadowDistance: 4,
    93. textAlign: 'left',
    94. },
    95. scaleLabel: {
    96. backgroundColor: '#424242',
    97. },
    98. },
    99. series: [{
    100. type: 'line',
    101. text: 'Remaining Tasks',
    102. values: [35, 42, 67, 89, 25, 34, 67, 85].sort().reverse(),
    103. lineColor: '#42a5f5',
    104. marker: {
    105. visible: false,
    106. },
    107. scales: 'scale-x, scale-y',
    108. },
    109. {
    110. type: 'line',
    111. text: 'Remaining Effort',
    112. values: [25, 32, 57, 79, 15, 24, 57, 75].sort().reverse(),
    113. lineColor: '#5c6bc0',
    114. marker: {
    115. type: 'square',
    116. backgroundColor: '#5c6bc0',
    117. },
    118. scales: 'scale-x, scale-y',
    119. },
    120. {
    121. type: 'line',
    122. text: 'Completed Tasks',
    123. values: [90, 80, 70, 60, 50, 40, 30, 20],
    124. lineColor: '#66bb6a',
    125. marker: {
    126. visible: false,
    127. },
    128. scales: 'scale-x, scale-y',
    129. },
    130. {
    131. type: 'bar',
    132. text: 'Completed Tasks',
    133. values: [5, 10, 6, 3, 6, 2, 0, 9],
    134. backgroundColor: '#ffa726',
    135. scales: 'scale-x, scale-y-2',
    136. },
    137. ],
    138. };
    139.  
    140. // RENDER CHARTS
    141. // -----------------------------
    142. zingchart.render({
    143. id: 'myChart',
    144. data: chartConfig,
    145. height: '100%',
    146. width: '100%',
    147. });
    148. </script>
    149. </body>
    150.  
    151. </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. <div id="myChart" class="chart--container">
    12. <a href="https://www.zingchart.com/" rel="noopener" class="zc-ref">Powered by ZingChart</a>
    13. </div>
    14.  
    15. </body>
    16.  
    17. </html>
    1. .zc-body {
    2. background-color: #fff;
    3. }
    4.  
    5. .chart--container {
    6. height: 100%;
    7. width: 100%;
    8. min-height: 530px;
    9. }
    10.  
    11. .zc-ref {
    12. display: none;
    13. }
    1. // CHART CONFIG
    2. // -----------------------------
    3. let chartConfig = {
    4. type: 'mixed',
    5. title: {
    6. text: 'Sample Burndown Chart',
    7. align: 'left',
    8. marginLeft: '23%',
    9. },
    10. legend: {
    11. adjustLayout: true,
    12. verticalAlign: 'middle',
    13. },
    14. scaleX: {
    15. labels: [
    16. 'Day 1',
    17. 'Day 2',
    18. 'Day 3',
    19. 'Day 4',
    20. 'Day 5',
    21. 'Day 6',
    22. 'Day 7',
    23. 'Day 8',
    24. ], // one label for every datapoint
    25. },
    26. scaleY: {
    27. guide: {
    28. // dashed lines
    29. visible: false,
    30. },
    31. label: {
    32. text: 'Remaing effort (hours)',
    33. fontSize: '14px',
    34. },
    35. },
    36. scaleY2: {
    37. label: {
    38. text: 'Remaing and completed tasks',
    39. fontSize: '14px',
    40. },
    41. maxValue: 100,
    42. minValue: 0,
    43. step: 25, // can define scale step values or default
    44. },
    45. crosshairX: {
    46. lineColor: '#424242',
    47. lineGapSize: '4px',
    48. lineStyle: 'dotted',
    49. plotLabel: {
    50. padding: '15px',
    51. backgroundColor: 'white',
    52. bold: true,
    53. borderColor: '#e3e3e3',
    54. borderRadius: '5px',
    55. fontColor: '#2f2f2f',
    56. fontFamily: 'Lato',
    57. fontSize: '12px',
    58. shadow: true,
    59. shadowAlpha: 0.2,
    60. shadowBlur: 5,
    61. shadowColor: '#a1a1a1',
    62. shadowDistance: 4,
    63. textAlign: 'left',
    64. },
    65. scaleLabel: {
    66. backgroundColor: '#424242',
    67. },
    68. },
    69. series: [{
    70. type: 'line',
    71. text: 'Remaining Tasks',
    72. values: [35, 42, 67, 89, 25, 34, 67, 85].sort().reverse(),
    73. lineColor: '#42a5f5',
    74. marker: {
    75. visible: false,
    76. },
    77. scales: 'scale-x, scale-y',
    78. },
    79. {
    80. type: 'line',
    81. text: 'Remaining Effort',
    82. values: [25, 32, 57, 79, 15, 24, 57, 75].sort().reverse(),
    83. lineColor: '#5c6bc0',
    84. marker: {
    85. type: 'square',
    86. backgroundColor: '#5c6bc0',
    87. },
    88. scales: 'scale-x, scale-y',
    89. },
    90. {
    91. type: 'line',
    92. text: 'Completed Tasks',
    93. values: [90, 80, 70, 60, 50, 40, 30, 20],
    94. lineColor: '#66bb6a',
    95. marker: {
    96. visible: false,
    97. },
    98. scales: 'scale-x, scale-y',
    99. },
    100. {
    101. type: 'bar',
    102. text: 'Completed Tasks',
    103. values: [5, 10, 6, 3, 6, 2, 0, 9],
    104. backgroundColor: '#ffa726',
    105. scales: 'scale-x, scale-y-2',
    106. },
    107. ],
    108. };
    109.  
    110. // RENDER CHARTS
    111. // -----------------------------
    112. zingchart.render({
    113. id: 'myChart',
    114. data: chartConfig,
    115. height: '100%',
    116. width: '100%',
    117. });