• 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. textAlpha: 1,
    37. offsetX: 360,
    38. offsetY: -5,
    39. topState: {
    40. backgroundColor: 'red',
    41. offsetX: 370,
    42. offsetY: 5,
    43. }
    44. },
    45. mediaRules: [{
    46. maxWidth: 400,
    47. lineColor: 'blue'
    48. }]
    49. },
    50. {
    51. type: "area",
    52. range: [0, 20],
    53. alpha: 0.7,
    54. label: { //define label within marker
    55. text: "Not Active",
    56. backgroundColor: "#555",
    57. fontColor: "white"
    58. }
    59. }
    60. ],
    61. },
    62. },
    63. plotarea: {
    64. marginRight: '10%'
    65. },
    66. series: [{
    67. values: [
    68. 4642,
    69. 4345,
    70. 2350,
    71. 1251
    72. ]
    73. }]
    74. };
    75.  
    76. zingchart.render({
    77. id: 'myChart',
    78. data: chartConfig,
    79. height: '100%',
    80. width: '100%'
    81. });
    82. </script>
    83. </body>
    84.  
    85. </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. textAlpha: 1,
    15. offsetX: 360,
    16. offsetY: -5,
    17. topState: {
    18. backgroundColor: 'red',
    19. offsetX: 370,
    20. offsetY: 5,
    21. }
    22. },
    23. mediaRules: [{
    24. maxWidth: 400,
    25. lineColor: 'blue'
    26. }]
    27. },
    28. {
    29. type: "area",
    30. range: [0, 20],
    31. alpha: 0.7,
    32. label: { //define label within marker
    33. text: "Not Active",
    34. backgroundColor: "#555",
    35. fontColor: "white"
    36. }
    37. }
    38. ],
    39. },
    40. },
    41. plotarea: {
    42. marginRight: '10%'
    43. },
    44. series: [{
    45. values: [
    46. 4642,
    47. 4345,
    48. 2350,
    49. 1251
    50. ]
    51. }]
    52. };
    53.  
    54. zingchart.render({
    55. id: 'myChart',
    56. data: chartConfig,
    57. height: '100%',
    58. width: '100%'
    59. });