• 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></style>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <script>
    15. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    16. var myConfig = {
    17. "type": "bar",
    18. "title": {
    19. "text": "%total"
    20. },
    21. "plot": {
    22. "stacked": true,
    23. "bar-width": "30%"
    24. },
    25. "scale-y": {
    26. "values": "0:200:50"
    27. },
    28. "series": [{
    29. "values": [64]
    30. },
    31. {
    32. "values": [35]
    33. },
    34. {
    35. "values": [31]
    36. },
    37. {
    38. "values": [23]
    39. },
    40. {
    41. "values": [14]
    42. },
    43. {
    44. "values": [9]
    45. },
    46. {
    47. "values": [5],
    48. "value-box": {
    49. "text": "Total: %total"
    50. }
    51. }
    52. ]
    53. };
    54.  
    55. zingchart.render({
    56. id: 'myChart',
    57. data: myConfig,
    58. height: 300,
    59. width: "100%"
    60. });
    61. </script>
    62. </body>
    63.  
    64. </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'></div>
    13. </body>
    14.  
    15. </html>
    1.  
    1. var myConfig = {
    2. "type": "bar",
    3. "title": {
    4. "text": "%total"
    5. },
    6. "plot": {
    7. "stacked": true,
    8. "bar-width": "30%"
    9. },
    10. "scale-y": {
    11. "values": "0:200:50"
    12. },
    13. "series": [{
    14. "values": [64]
    15. },
    16. {
    17. "values": [35]
    18. },
    19. {
    20. "values": [31]
    21. },
    22. {
    23. "values": [23]
    24. },
    25. {
    26. "values": [14]
    27. },
    28. {
    29. "values": [9]
    30. },
    31. {
    32. "values": [5],
    33. "value-box": {
    34. "text": "Total: %total"
    35. }
    36. }
    37. ]
    38. };
    39.  
    40. zingchart.render({
    41. id: 'myChart',
    42. data: myConfig,
    43. height: 300,
    44. width: "100%"
    45. });