• 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.  
    24. .zc-ref {
    25. display: none;
    26. }
    27. </style>
    28. </head>
    29.  
    30. <body>
    31. <div id="myChart"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></div>
    32. <script>
    33. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    34. let chartConfig = {
    35. type: 'navpie',
    36. options: {
    37. threshold: '20%',
    38. others: {
    39. text: 'Others',
    40. backgroundColor: '#999 #333'
    41. },
    42. back: {
    43. backgroundColor: '#47a',
    44. border: '3px solid #47a',
    45. borderRadius: 9,
    46. color: '#fff',
    47. fontWeight: 'bold',
    48. fontSize: 12,
    49. padding: 10,
    50. shadow: true,
    51. shadowAlpha: 0.5,
    52.  
    53. tooltip: {
    54. text: 'Back to main chart',
    55. callout: true,
    56.  
    57. mediaRules: [{
    58. maxWidth: 400,
    59. backgroundColor: 'red'
    60. }],
    61. },
    62.  
    63. mediaRules: [{
    64. maxWidth: 400,
    65. backgroundColor: 'red'
    66. }],
    67. },
    68. },
    69. series: [{
    70. values: [69],
    71. text: 'Apple'
    72. },
    73. {
    74. values: [51],
    75. text: 'Microsoft'
    76. },
    77. {
    78. values: [42],
    79. text: 'Oracle'
    80. },
    81. {
    82. values: [20],
    83. text: 'Dell'
    84. },
    85. {
    86. values: [19],
    87. text: 'Amazon'
    88. },
    89. ]
    90. }
    91.  
    92. zingchart.render({
    93. id: 'myChart',
    94. data: chartConfig,
    95. height: '100%',
    96. width: '100%'
    97. });
    98. </script>
    99. </body>
    100.  
    101. </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"><a class="zc-ref" href="https://www.zingchart.com">Powered by ZingChart</a></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. }
    14.  
    15. .zc-ref {
    16. display: none;
    17. }
    1. let chartConfig = {
    2. type: 'navpie',
    3. options: {
    4. threshold: '20%',
    5. others: {
    6. text: 'Others',
    7. backgroundColor: '#999 #333'
    8. },
    9. back: {
    10. backgroundColor: '#47a',
    11. border: '3px solid #47a',
    12. borderRadius: 9,
    13. color: '#fff',
    14. fontWeight: 'bold',
    15. fontSize: 12,
    16. padding: 10,
    17. shadow: true,
    18. shadowAlpha: 0.5,
    19.  
    20. tooltip: {
    21. text: 'Back to main chart',
    22. callout: true,
    23.  
    24. mediaRules: [{
    25. maxWidth: 400,
    26. backgroundColor: 'red'
    27. }],
    28. },
    29.  
    30. mediaRules: [{
    31. maxWidth: 400,
    32. backgroundColor: 'red'
    33. }],
    34. },
    35. },
    36. series: [{
    37. values: [69],
    38. text: 'Apple'
    39. },
    40. {
    41. values: [51],
    42. text: 'Microsoft'
    43. },
    44. {
    45. values: [42],
    46. text: 'Oracle'
    47. },
    48. {
    49. values: [20],
    50. text: 'Dell'
    51. },
    52. {
    53. values: [19],
    54. text: 'Amazon'
    55. },
    56. ]
    57. }
    58.  
    59. zingchart.render({
    60. id: 'myChart',
    61. data: chartConfig,
    62. height: '100%',
    63. width: '100%'
    64. });