• 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.  
    24. function config(startWidth) {
    25. return {
    26. type: 'funnel',
    27. title: {
    28. text: `startWidth = ${startWidth}`,
    29. },
    30. plot: {
    31. startWidth: startWidth
    32. },
    33. series: [{
    34. values: [101, 50]
    35. },
    36. {
    37. values: [90, 45]
    38. },
    39. {
    40. values: [60, 30]
    41. },
    42. {
    43. values: [30, 22]
    44. },
    45. {
    46. values: [15, 10]
    47. }
    48. ]
    49. };
    50. };
    51.  
    52. let chartConfig = {
    53. graphset: [
    54. config('dynamic'),
    55. config('static')
    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. height: 100%;
    5. width: 100%;
    6. }
    1. function config(startWidth) {
    2. return {
    3. type: 'funnel',
    4. title: {
    5. text: `startWidth = ${startWidth}`,
    6. },
    7. plot: {
    8. startWidth: startWidth
    9. },
    10. series: [{
    11. values: [101, 50]
    12. },
    13. {
    14. values: [90, 45]
    15. },
    16. {
    17. values: [60, 30]
    18. },
    19. {
    20. values: [30, 22]
    21. },
    22. {
    23. values: [15, 10]
    24. }
    25. ]
    26. };
    27. };
    28.  
    29. let chartConfig = {
    30. graphset: [
    31. config('dynamic'),
    32. config('static')
    33. ]
    34. };
    35.  
    36. zingchart.render({
    37. id: 'myChart',
    38. data: chartConfig,
    39. height: '100%',
    40. width: '100%'
    41. });