• 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 myConfig = {
    24. "type": "funnel",
    25. "scale-y": {
    26. "placement": "opposite",
    27. "labels": ["Site Visits", "Trial Downloads", "Quote Requests", "Sales", "Renewals"],
    28. "item": {
    29. "font-color": "#999999",
    30. "font-family": "Georgia"
    31. }
    32. },
    33. "plot": {
    34. "value-box": {
    35. "text": "%v",
    36. "placement": "in",
    37. "font-color": "gray",
    38. "font-family": "Georgia",
    39. "font-size": 12,
    40. "font-weight": "normal"
    41. },
    42. "min-exit": "10%",
    43. "hover-state": {
    44. "background-color": "purple",
    45. "border-color": "gray",
    46. "border-width": 3,
    47. "line-style": "dashdot"
    48. },
    49. "tooltip": {
    50. "text": "Value: %v<br>Text: %t<br>Percentage (relative to sum of all values): %node-percent-value%<br>Percentage (relative to previous node): %output-percent-value%",
    51. "font-family": "Georgia",
    52. "font-size": 12
    53. }
    54. },
    55. "series": [{
    56. "values": [101],
    57. "text": "Site Visits",
    58. "background-color": "red"
    59. },
    60. {
    61. "values": [90],
    62. "text": "Trial Downloads",
    63. "background-color": "orange"
    64. },
    65. {
    66. "values": [60],
    67. "text": "Quote Requests",
    68. "background-color": "yellow"
    69. },
    70. {
    71. "values": [30],
    72. "text": "Sales",
    73. "background-color": "green"
    74. },
    75. {
    76. "values": [15],
    77. "text": "Renewals",
    78. "background-color": "blue"
    79. }
    80. ]
    81. };
    82.  
    83. zingchart.render({
    84. id: 'myChart',
    85. data: myConfig,
    86. height: "100%",
    87. width: "100%"
    88. });
    89. </script>
    90. </body>
    91.  
    92. </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 myConfig = {
    2. "type": "funnel",
    3. "scale-y": {
    4. "placement": "opposite",
    5. "labels": ["Site Visits", "Trial Downloads", "Quote Requests", "Sales", "Renewals"],
    6. "item": {
    7. "font-color": "#999999",
    8. "font-family": "Georgia"
    9. }
    10. },
    11. "plot": {
    12. "value-box": {
    13. "text": "%v",
    14. "placement": "in",
    15. "font-color": "gray",
    16. "font-family": "Georgia",
    17. "font-size": 12,
    18. "font-weight": "normal"
    19. },
    20. "min-exit": "10%",
    21. "hover-state": {
    22. "background-color": "purple",
    23. "border-color": "gray",
    24. "border-width": 3,
    25. "line-style": "dashdot"
    26. },
    27. "tooltip": {
    28. "text": "Value: %v<br>Text: %t<br>Percentage (relative to sum of all values): %node-percent-value%<br>Percentage (relative to previous node): %output-percent-value%",
    29. "font-family": "Georgia",
    30. "font-size": 12
    31. }
    32. },
    33. "series": [{
    34. "values": [101],
    35. "text": "Site Visits",
    36. "background-color": "red"
    37. },
    38. {
    39. "values": [90],
    40. "text": "Trial Downloads",
    41. "background-color": "orange"
    42. },
    43. {
    44. "values": [60],
    45. "text": "Quote Requests",
    46. "background-color": "yellow"
    47. },
    48. {
    49. "values": [30],
    50. "text": "Sales",
    51. "background-color": "green"
    52. },
    53. {
    54. "values": [15],
    55. "text": "Renewals",
    56. "background-color": "blue"
    57. }
    58. ]
    59. };
    60.  
    61. zingchart.render({
    62. id: 'myChart',
    63. data: myConfig,
    64. height: "100%",
    65. width: "100%"
    66. });