• 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. width: 100%;
    14. height: 100%;
    15. }
    16. </style>
    17. </head>
    18.  
    19. <body>
    20. <div id='myChart'></div>
    21. <script>
    22. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    23. let chartConfig = {
    24. type: 'pop-pyramid',
    25. options: {
    26. side1: {
    27. plotarea: {
    28. backgroundColor: '#D04347'
    29. }
    30. },
    31. side2: {
    32. plotarea: {
    33. backgroundColor: '#319CFC'
    34. }
    35. }
    36. },
    37. plot: {
    38. stacked: true
    39. },
    40. scaleX: {
    41. values: ['0-4', '5-9', '10-14', '15-19', '20-24', '25-29', '30-34', '35-39', '40-44', '45-49', '50-54', '55-59', '60-64', '65-69', '70-74', '75-79', '80-84', '85-89', '90-94', '95-99', '100 + ']
    42. },
    43. scaleY: {
    44. short: true
    45. },
    46. series: [{
    47. dataSide: 1,
    48. backgroundColor: '#007DF0 #0055A4',
    49. values: [1656154, 1787564, 1981671, 2108575, 2403438, 2366003, 2301402, 2519874, 3360596, 3493473, 3050775, 2759560, 2304444, 2426504, 2568938, 1785638, 1447162, 1005011, 1330870, 1130632, 1121208]
    50. },
    51. {
    52. dataSide: 2,
    53. backgroundColor: '#94090D #D40D12',
    54. values: [1656154, 1787564, 1981671, 2108575, 2403438, 2366003, 2301402, 2519874, 3360596, 3493473, 3050775, 2759560, 2304444, 2426504, 2568938, 1785638, 1447162, 1005011, 1330870, 1130632, 1121208]
    55. }
    56. ]
    57. };
    58.  
    59. zingchart.render({
    60. id: 'myChart',
    61. data: chartConfig,
    62. height: '100%',
    63. width: '100%'
    64. });
    65. </script>
    66. </body>
    67.  
    68. </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. width: 100%;
    5. height: 100%;
    6. }
    1. let chartConfig = {
    2. type: 'pop-pyramid',
    3. options: {
    4. side1: {
    5. plotarea: {
    6. backgroundColor: '#D04347'
    7. }
    8. },
    9. side2: {
    10. plotarea: {
    11. backgroundColor: '#319CFC'
    12. }
    13. }
    14. },
    15. plot: {
    16. stacked: true
    17. },
    18. scaleX: {
    19. values: ['0-4', '5-9', '10-14', '15-19', '20-24', '25-29', '30-34', '35-39', '40-44', '45-49', '50-54', '55-59', '60-64', '65-69', '70-74', '75-79', '80-84', '85-89', '90-94', '95-99', '100 + ']
    20. },
    21. scaleY: {
    22. short: true
    23. },
    24. series: [{
    25. dataSide: 1,
    26. backgroundColor: '#007DF0 #0055A4',
    27. values: [1656154, 1787564, 1981671, 2108575, 2403438, 2366003, 2301402, 2519874, 3360596, 3493473, 3050775, 2759560, 2304444, 2426504, 2568938, 1785638, 1447162, 1005011, 1330870, 1130632, 1121208]
    28. },
    29. {
    30. dataSide: 2,
    31. backgroundColor: '#94090D #D40D12',
    32. values: [1656154, 1787564, 1981671, 2108575, 2403438, 2366003, 2301402, 2519874, 3360596, 3493473, 3050775, 2759560, 2304444, 2426504, 2568938, 1785638, 1447162, 1005011, 1330870, 1130632, 1121208]
    33. }
    34. ]
    35. };
    36.  
    37. zingchart.render({
    38. id: 'myChart',
    39. data: chartConfig,
    40. height: '100%',
    41. width: '100%'
    42. });