• 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. let chartConfig = {
    24. type: 'pareto',
    25. options: {
    26. scaleY2: {
    27. markers: [{
    28. type: "line",
    29. range: [78],
    30. lineColor: "red",
    31. lineWidth: 2,
    32. label: { //define label within marker
    33. text: "Maximum Acceptable Level",
    34. backgroundColor: "white",
    35. alpha: 0.7,
    36. borderColor: '#f60',
    37. borderWidth: 2,
    38. textAlpha: 1,
    39. offsetX: 360,
    40. offsetY: -30,
    41. callout: true,
    42. calloutWidth: 0,
    43. calloutHeight: 30,
    44. calloutPosition: 'bottom',
    45. bordeRradius: -5,
    46. calloutTip: {
    47. type: 'circle',
    48. backgroundColor: '#fff',
    49. borderWidth: 2,
    50. borderColor: '#f60',
    51. size: 5,
    52. },
    53. },
    54. mediaRules: [{
    55. maxWidth: 400,
    56. lineColor: 'blue'
    57. }]
    58. },
    59. {
    60. type: "area",
    61. range: [0, 20],
    62. alpha: 0.7,
    63. label: { //define label within marker
    64. text: "Not Active",
    65. backgroundColor: "#555",
    66. fontColor: "white"
    67. }
    68. }
    69. ],
    70. },
    71. },
    72. plotarea: {
    73. marginRight: '10%'
    74. },
    75. series: [{
    76. values: [
    77. 4642,
    78. 4345,
    79. 2350,
    80. 1251
    81. ]
    82. }]
    83. };
    84.  
    85. zingchart.render({
    86. id: 'myChart',
    87. data: chartConfig,
    88. height: '100%',
    89. width: '100%'
    90. });
    91. </script>
    92. </body>
    93.  
    94. </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. let chartConfig = {
    2. type: 'pareto',
    3. options: {
    4. scaleY2: {
    5. markers: [{
    6. type: "line",
    7. range: [78],
    8. lineColor: "red",
    9. lineWidth: 2,
    10. label: { //define label within marker
    11. text: "Maximum Acceptable Level",
    12. backgroundColor: "white",
    13. alpha: 0.7,
    14. borderColor: '#f60',
    15. borderWidth: 2,
    16. textAlpha: 1,
    17. offsetX: 360,
    18. offsetY: -30,
    19. callout: true,
    20. calloutWidth: 0,
    21. calloutHeight: 30,
    22. calloutPosition: 'bottom',
    23. bordeRradius: -5,
    24. calloutTip: {
    25. type: 'circle',
    26. backgroundColor: '#fff',
    27. borderWidth: 2,
    28. borderColor: '#f60',
    29. size: 5,
    30. },
    31. },
    32. mediaRules: [{
    33. maxWidth: 400,
    34. lineColor: 'blue'
    35. }]
    36. },
    37. {
    38. type: "area",
    39. range: [0, 20],
    40. alpha: 0.7,
    41. label: { //define label within marker
    42. text: "Not Active",
    43. backgroundColor: "#555",
    44. fontColor: "white"
    45. }
    46. }
    47. ],
    48. },
    49. },
    50. plotarea: {
    51. marginRight: '10%'
    52. },
    53. series: [{
    54. values: [
    55. 4642,
    56. 4345,
    57. 2350,
    58. 1251
    59. ]
    60. }]
    61. };
    62.  
    63. zingchart.render({
    64. id: 'myChart',
    65. data: chartConfig,
    66. height: '100%',
    67. width: '100%'
    68. });