• 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 chartData = {
    24. "graphset": [{
    25. "id": "years",
    26. "x": "0%",
    27. "y": "0%",
    28. "width": "100%",
    29. "height": "50%",
    30. "type": "bar",
    31. "background-color": "#f4f6fc",
    32. "title": {
    33. "text": "Parent Child Drilldown"
    34. },
    35. "plotarea": {
    36. "margin": "40 10 30 50",
    37. "background-color": "#f4f6fc"
    38. },
    39. "scale-x": {
    40. "line-color": "#AFB2AF",
    41. "line-width": "2px",
    42. "values": "1990:2010",
    43. "max-items": 99,
    44. "tick": {
    45. "line-color": "#AFB2AF",
    46. "line-width": "1px"
    47. },
    48. "item": {
    49. "font-color": "#59514E"
    50. },
    51. "guide": {
    52. "visible": false
    53. }
    54. },
    55. "plot": {
    56. "bars-overlap": "100%",
    57. "rules": []
    58. },
    59. "scale-y": {
    60. "line-color": "#AFB2AF",
    61. "values": "0:150:25",
    62. "min-value": 0,
    63. "tick": {
    64. "line-color": "#AFB2AF",
    65. "line-width": "2px"
    66. },
    67. "item": {
    68. "font-color": "#59514E",
    69. "padding": "4px"
    70. },
    71. "guide": {
    72. "visible": false
    73. }
    74. },
    75. "series": [{
    76. "values": [81, 106, 110, 114, 133, 108, 101, 120, 116, 113, 123, 130, 132, 124, 128, 122, 115, 104, 123, 146, 113],
    77. "background-color": "#fad000 #fa9e00",
    78. "border-radius": "7px 7px 0px 0px",
    79. "border-width": "2px",
    80. "border-color": "#fff",
    81. "url": "https://us-central1-zingchart-com.cloudfunctions.net/public_pie_datamonths?year=%scale-key-value",
    82. "target": "graph=months",
    83. "z-index": 1,
    84. "tooltip": {
    85. "shadow-color": "#fff"
    86. }
    87. },
    88. {
    89. "values": [150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150],
    90. "background-color": "#E8E7E8",
    91. "maxTrackers": 0,
    92. "z-index": 0
    93. }
    94. ]
    95. },
    96. {
    97. "id": "months",
    98. "background-color": "#f4f6fc",
    99. "x": "0%",
    100. "y": "50%",
    101. "width": "100%",
    102. "height": "50%",
    103. "type": "null",
    104. "labels": [{
    105. "text": "Click on a year above to view monthly stats for that year",
    106. "width": 400,
    107. "height": 40,
    108. "margin": "auto auto",
    109. "border-width": 2,
    110. "border-radius": 10,
    111. "padding": 20,
    112. "background-color": "#fff"
    113. }]
    114. }
    115. ]
    116. };
    117.  
    118. zingchart.render({
    119. id: "myChart",
    120. output: "svg",
    121. height: "100%",
    122. width: "100%",
    123. data: chartData
    124. });
    125. </script>
    126. </body>
    127.  
    128. </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 chartData = {
    2. "graphset": [{
    3. "id": "years",
    4. "x": "0%",
    5. "y": "0%",
    6. "width": "100%",
    7. "height": "50%",
    8. "type": "bar",
    9. "background-color": "#f4f6fc",
    10. "title": {
    11. "text": "Parent Child Drilldown"
    12. },
    13. "plotarea": {
    14. "margin": "40 10 30 50",
    15. "background-color": "#f4f6fc"
    16. },
    17. "scale-x": {
    18. "line-color": "#AFB2AF",
    19. "line-width": "2px",
    20. "values": "1990:2010",
    21. "max-items": 99,
    22. "tick": {
    23. "line-color": "#AFB2AF",
    24. "line-width": "1px"
    25. },
    26. "item": {
    27. "font-color": "#59514E"
    28. },
    29. "guide": {
    30. "visible": false
    31. }
    32. },
    33. "plot": {
    34. "bars-overlap": "100%",
    35. "rules": []
    36. },
    37. "scale-y": {
    38. "line-color": "#AFB2AF",
    39. "values": "0:150:25",
    40. "min-value": 0,
    41. "tick": {
    42. "line-color": "#AFB2AF",
    43. "line-width": "2px"
    44. },
    45. "item": {
    46. "font-color": "#59514E",
    47. "padding": "4px"
    48. },
    49. "guide": {
    50. "visible": false
    51. }
    52. },
    53. "series": [{
    54. "values": [81, 106, 110, 114, 133, 108, 101, 120, 116, 113, 123, 130, 132, 124, 128, 122, 115, 104, 123, 146, 113],
    55. "background-color": "#fad000 #fa9e00",
    56. "border-radius": "7px 7px 0px 0px",
    57. "border-width": "2px",
    58. "border-color": "#fff",
    59. "url": "https://us-central1-zingchart-com.cloudfunctions.net/public_pie_datamonths?year=%scale-key-value",
    60. "target": "graph=months",
    61. "z-index": 1,
    62. "tooltip": {
    63. "shadow-color": "#fff"
    64. }
    65. },
    66. {
    67. "values": [150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150],
    68. "background-color": "#E8E7E8",
    69. "maxTrackers": 0,
    70. "z-index": 0
    71. }
    72. ]
    73. },
    74. {
    75. "id": "months",
    76. "background-color": "#f4f6fc",
    77. "x": "0%",
    78. "y": "50%",
    79. "width": "100%",
    80. "height": "50%",
    81. "type": "null",
    82. "labels": [{
    83. "text": "Click on a year above to view monthly stats for that year",
    84. "width": 400,
    85. "height": 40,
    86. "margin": "auto auto",
    87. "border-width": 2,
    88. "border-radius": 10,
    89. "padding": 20,
    90. "background-color": "#fff"
    91. }]
    92. }
    93. ]
    94. };
    95.  
    96. zingchart.render({
    97. id: "myChart",
    98. output: "svg",
    99. height: "100%",
    100. width: "100%",
    101. data: chartData
    102. });