• 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. #myChart {
    13. height: 100%;
    14. width: 100%;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <div id='myChart'></div>
    21. <script>
    22. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    23. var myConfig = {
    24. "type": "line",
    25. "plot": {
    26. "stacked": true,
    27. "stack-type": "100%"
    28. },
    29. "scale-y": {
    30. "min-value": 0,
    31. "max-value": 100
    32. },
    33. "series": [{
    34. "values": [
    35. 20,
    36. 40,
    37. 25,
    38. 50,
    39. 15,
    40. 45,
    41. 33,
    42. 34
    43. ]
    44. },
    45. {
    46. "values": [
    47. 5,
    48. 30,
    49. 21,
    50. 18,
    51. 59,
    52. 50,
    53. 28,
    54. 33
    55. ]
    56. },
    57. {
    58. "values": [
    59. 30,
    60. 5,
    61. 18,
    62. 21,
    63. 33,
    64. 41,
    65. 29,
    66. 15
    67. ]
    68. }
    69. ]
    70. };
    71.  
    72. zingchart.render({
    73. id: 'myChart',
    74. data: myConfig,
    75. height: '100%',
    76. width: '100%'
    77. });
    78. </script>
    79. </body>
    80.  
    81. </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. html,
    2. body,
    3. #myChart {
    4. height: 100%;
    5. width: 100%;
    6. }
    1. var myConfig = {
    2. "type": "line",
    3. "plot": {
    4. "stacked": true,
    5. "stack-type": "100%"
    6. },
    7. "scale-y": {
    8. "min-value": 0,
    9. "max-value": 100
    10. },
    11. "series": [{
    12. "values": [
    13. 20,
    14. 40,
    15. 25,
    16. 50,
    17. 15,
    18. 45,
    19. 33,
    20. 34
    21. ]
    22. },
    23. {
    24. "values": [
    25. 5,
    26. 30,
    27. 21,
    28. 18,
    29. 59,
    30. 50,
    31. 28,
    32. 33
    33. ]
    34. },
    35. {
    36. "values": [
    37. 30,
    38. 5,
    39. 18,
    40. 21,
    41. 33,
    42. 41,
    43. 29,
    44. 15
    45. ]
    46. }
    47. ]
    48. };
    49.  
    50. zingchart.render({
    51. id: 'myChart',
    52. data: myConfig,
    53. height: '100%',
    54. width: '100%'
    55. });