• 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. </style>
    24. </head>
    25.  
    26. <body>
    27. <div id="myChart"></div>
    28. <script>
    29. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    30. let chartConfig = {
    31. "graphset": [{
    32. "id": "years",
    33. "x": "0%",
    34. "y": "0%",
    35. "width": "100%",
    36. "height": "40%",
    37. "type": "bar",
    38. "title": {
    39. "text": "Parent Child Drilldown"
    40. },
    41. "plotarea": {
    42. "margin-top": 50,
    43. "margin-right": 30,
    44. "margin-bottom": 40,
    45. "margin-left": 50
    46. },
    47. "scale-x": {
    48. "values": "1994:2014",
    49. "max-items": 99,
    50. "guide": {
    51. "visible": false
    52. }
    53. },
    54. "plot": {
    55. "bars-overlap": "100%",
    56. "rules": []
    57. },
    58. "scale-y": {
    59. "values": "0:150:25",
    60. "min-value": 0,
    61. "guide": {
    62. "visible": false
    63. }
    64. },
    65. "series": [{
    66. "values": [81, 106, 110, 114, 133, 108, 101, 120, 116, 113, 123, 130, 132, 124, 128, 122, 115, 104, 123, 146, 113],
    67. // this url is the request for months and following filpath is the link to the second page used with data_months
    68. "url": "https://us-central1-zingchart-com.cloudfunctions.net/public_pie_datamonths?year=%scale-key-value&filepath=https://us-central1-zingchart-com.cloudfunctions.net/public_pie_datadays",
    69. "target": "graph=months", // the chart id to target the config returned from the url. So within data_months_php the target will be graph=days
    70. "z-index": 1
    71. },
    72. { //just to make the background gray...
    73. "values": [150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150],
    74. "background-color": "#E8E7E8",
    75. "maxTrackers": 0,
    76. "z-index": 0
    77. }
    78. ]
    79. },
    80. {
    81. "id": "months",
    82. "x": "0%",
    83. "y": "40%",
    84. "width": "100%",
    85. "height": "30%",
    86. "type": "null",
    87. "labels": [{
    88. "text": "Click on a YEAR above to view monthly stats",
    89. "width": "70%",
    90. "height": 40,
    91. "margin": "auto auto",
    92. "border-width": 1,
    93. "border-radius": 2,
    94. "padding": 20,
    95. "background-color": "#f9f9f9"
    96. }]
    97. },
    98. {
    99. "id": "days",
    100. "x": "0%",
    101. "y": "70%",
    102. "width": "100%",
    103. "height": "30%",
    104. "type": "null",
    105. "scale-x": {
    106. "max-labels": 16
    107. },
    108. "labels": [{
    109. "text": "Click on a MONTH above to view daily stats",
    110. "width": "70%",
    111. "height": 40,
    112. "margin": "auto auto",
    113. "border-width": 1,
    114. "border-radius": 2,
    115. "padding": 20,
    116. "background-color": "#f9f9f9"
    117. }]
    118. }
    119. ],
    120. "background-color": "white"
    121. };
    122.  
    123. zingchart.render({
    124. id: 'myChart',
    125. data: chartConfig,
    126. height: '100%',
    127. width: '100%',
    128. cachePolicy: '',
    129. });
    130. </script>
    131. </body>
    132.  
    133. </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. 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. }
    1. let chartConfig = {
    2. "graphset": [{
    3. "id": "years",
    4. "x": "0%",
    5. "y": "0%",
    6. "width": "100%",
    7. "height": "40%",
    8. "type": "bar",
    9. "title": {
    10. "text": "Parent Child Drilldown"
    11. },
    12. "plotarea": {
    13. "margin-top": 50,
    14. "margin-right": 30,
    15. "margin-bottom": 40,
    16. "margin-left": 50
    17. },
    18. "scale-x": {
    19. "values": "1994:2014",
    20. "max-items": 99,
    21. "guide": {
    22. "visible": false
    23. }
    24. },
    25. "plot": {
    26. "bars-overlap": "100%",
    27. "rules": []
    28. },
    29. "scale-y": {
    30. "values": "0:150:25",
    31. "min-value": 0,
    32. "guide": {
    33. "visible": false
    34. }
    35. },
    36. "series": [{
    37. "values": [81, 106, 110, 114, 133, 108, 101, 120, 116, 113, 123, 130, 132, 124, 128, 122, 115, 104, 123, 146, 113],
    38. // this url is the request for months and following filpath is the link to the second page used with data_months
    39. "url": "https://us-central1-zingchart-com.cloudfunctions.net/public_pie_datamonths?year=%scale-key-value&filepath=https://us-central1-zingchart-com.cloudfunctions.net/public_pie_datadays",
    40. "target": "graph=months", // the chart id to target the config returned from the url. So within data_months_php the target will be graph=days
    41. "z-index": 1
    42. },
    43. { //just to make the background gray...
    44. "values": [150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150, 150],
    45. "background-color": "#E8E7E8",
    46. "maxTrackers": 0,
    47. "z-index": 0
    48. }
    49. ]
    50. },
    51. {
    52. "id": "months",
    53. "x": "0%",
    54. "y": "40%",
    55. "width": "100%",
    56. "height": "30%",
    57. "type": "null",
    58. "labels": [{
    59. "text": "Click on a YEAR above to view monthly stats",
    60. "width": "70%",
    61. "height": 40,
    62. "margin": "auto auto",
    63. "border-width": 1,
    64. "border-radius": 2,
    65. "padding": 20,
    66. "background-color": "#f9f9f9"
    67. }]
    68. },
    69. {
    70. "id": "days",
    71. "x": "0%",
    72. "y": "70%",
    73. "width": "100%",
    74. "height": "30%",
    75. "type": "null",
    76. "scale-x": {
    77. "max-labels": 16
    78. },
    79. "labels": [{
    80. "text": "Click on a MONTH above to view daily stats",
    81. "width": "70%",
    82. "height": 40,
    83. "margin": "auto auto",
    84. "border-width": 1,
    85. "border-radius": 2,
    86. "padding": 20,
    87. "background-color": "#f9f9f9"
    88. }]
    89. }
    90. ],
    91. "background-color": "white"
    92. };
    93.  
    94. zingchart.render({
    95. id: 'myChart',
    96. data: chartConfig,
    97. height: '100%',
    98. width: '100%',
    99. cachePolicy: '',
    100. });