• 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. stacked: true,
    37. legend: {
    38. toggleAction: 'remove'
    39. },
    40. scaleX: {
    41. labels: ['Week 1', 'Week 2', 'Week 3']
    42. },
    43. plot: {
    44. valueBox: {
    45. text: "Stack Avg: %stack-average<br> Stack Height: %stack-length<br>Stack Total: %stack-total",
    46. backgroundColor: 'black',
    47. rules: [{
    48. rule: '%stack-top == 0',
    49. visible: 0
    50. }]
    51. }
    52. },
    53. series: [{
    54. values: [35, 42, 67],
    55. stack: 1
    56. },
    57. {
    58. values: [10, 15, 10],
    59. stack: 1
    60. },
    61. {
    62. values: [25, 45, 25],
    63. visible: false,
    64. stack: 1
    65. },
    66. {
    67. values: [25, 45, 25],
    68. stack: 2
    69. },
    70. {
    71. values: [25, 45, 25],
    72. stack: 3
    73. },
    74. {
    75. values: [25, 45, 25],
    76. stack: 3
    77. },
    78. ]
    79. };
    80.  
    81. zingchart.render({
    82. id: 'myChart',
    83. data: myConfig,
    84. height: '100%',
    85. width: '100%'
    86. });
    87. </script>
    88. </body>
    89.  
    90. </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. stacked: true,
    4. legend: {
    5. toggleAction: 'remove'
    6. },
    7. scaleX: {
    8. labels: ['Week 1', 'Week 2', 'Week 3']
    9. },
    10. plot: {
    11. valueBox: {
    12. text: "Stack Avg: %stack-average<br> Stack Height: %stack-length<br>Stack Total: %stack-total",
    13. backgroundColor: 'black',
    14. rules: [{
    15. rule: '%stack-top == 0',
    16. visible: 0
    17. }]
    18. }
    19. },
    20. series: [{
    21. values: [35, 42, 67],
    22. stack: 1
    23. },
    24. {
    25. values: [10, 15, 10],
    26. stack: 1
    27. },
    28. {
    29. values: [25, 45, 25],
    30. visible: false,
    31. stack: 1
    32. },
    33. {
    34. values: [25, 45, 25],
    35. stack: 2
    36. },
    37. {
    38. values: [25, 45, 25],
    39. stack: 3
    40. },
    41. {
    42. values: [25, 45, 25],
    43. stack: 3
    44. },
    45. ]
    46. };
    47.  
    48. zingchart.render({
    49. id: 'myChart',
    50. data: myConfig,
    51. height: '100%',
    52. width: '100%'
    53. });