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