• 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": "nestedpie",
    18. "title": {
    19. "text": "Value Boxes"
    20. },
    21. "plot": {
    22. "value-box": {
    23. "text": "%data-year",
    24. "font-color": "white",
    25. "font-family": "Georgia",
    26. "font-size": 12,
    27. "font-weight": "normal",
    28. "rules": [{
    29. "rule": "%p != 0",
    30. "visible": false
    31. }]
    32. },
    33. "data-year": ["2014", "2015", "2016"],
    34. "tooltip": {
    35. "text": "Ages %t: %v",
    36. "font-color": "black",
    37. "font-family": "Georgia",
    38. "font-size": 12,
    39. "background-color": "white",
    40. "border-width": 1,
    41. "border-color": "gray",
    42. "border-radius": "3px",
    43. "line-style": "dashdot",
    44. "padding": "10%",
    45. "text-alpha": 1,
    46. "alpha": 0.7
    47. },
    48. "alpha": 0.8,
    49. "shadow": false,
    50. "border-width": 1,
    51. "border-color": "white",
    52. "slice-start": "30%",
    53. },
    54. "series": [{
    55. "values": [59, 55, 30],
    56. "background-color": "orange red",
    57. "text": "0-18"
    58. },
    59. {
    60. "values": [60, 50, 35],
    61. "background-color": "yellow orange",
    62. "text": "19-30"
    63. },
    64. {
    65. "values": [50, 40, 30],
    66. "background-color": "green blue",
    67. "text": "31-34"
    68. },
    69. {
    70. "values": [61, 59, 35],
    71. "background-color": "blue purple",
    72. "text": "46-64"
    73. },
    74. {
    75. "values": [65, 55, 45],
    76. "background-color": "purple red",
    77. "text": "65 and over"
    78. }
    79. ]
    80. };
    81.  
    82. zingchart.render({
    83. id: 'myChart',
    84. data: myConfig,
    85. height: 400,
    86. width: "100%"
    87. });
    88. </script>
    89. </body>
    90.  
    91. </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": "nestedpie",
    3. "title": {
    4. "text": "Value Boxes"
    5. },
    6. "plot": {
    7. "value-box": {
    8. "text": "%data-year",
    9. "font-color": "white",
    10. "font-family": "Georgia",
    11. "font-size": 12,
    12. "font-weight": "normal",
    13. "rules": [{
    14. "rule": "%p != 0",
    15. "visible": false
    16. }]
    17. },
    18. "data-year": ["2014", "2015", "2016"],
    19. "tooltip": {
    20. "text": "Ages %t: %v",
    21. "font-color": "black",
    22. "font-family": "Georgia",
    23. "font-size": 12,
    24. "background-color": "white",
    25. "border-width": 1,
    26. "border-color": "gray",
    27. "border-radius": "3px",
    28. "line-style": "dashdot",
    29. "padding": "10%",
    30. "text-alpha": 1,
    31. "alpha": 0.7
    32. },
    33. "alpha": 0.8,
    34. "shadow": false,
    35. "border-width": 1,
    36. "border-color": "white",
    37. "slice-start": "30%",
    38. },
    39. "series": [{
    40. "values": [59, 55, 30],
    41. "background-color": "orange red",
    42. "text": "0-18"
    43. },
    44. {
    45. "values": [60, 50, 35],
    46. "background-color": "yellow orange",
    47. "text": "19-30"
    48. },
    49. {
    50. "values": [50, 40, 30],
    51. "background-color": "green blue",
    52. "text": "31-34"
    53. },
    54. {
    55. "values": [61, 59, 35],
    56. "background-color": "blue purple",
    57. "text": "46-64"
    58. },
    59. {
    60. "values": [65, 55, 45],
    61. "background-color": "purple red",
    62. "text": "65 and over"
    63. }
    64. ]
    65. };
    66.  
    67. zingchart.render({
    68. id: 'myChart',
    69. data: myConfig,
    70. height: 400,
    71. width: "100%"
    72. });