• 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></style>
    10. </head>
    11.  
    12. <body>
    13. <div id='myChart'></div>
    14. <script>
    15. ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
    16. let chartConfig = {
    17. type: 'gauge',
    18. scaleR: {
    19. markers: [{
    20. type: 'area',
    21. range: [10, 30],
    22.  
    23. alpha: 1,
    24. backgroundColor: '#ff4d4d',
    25. borderColor: 'red',
    26. borderWidth: 1,
    27. offsetEnd: 0.1,
    28. offsetStart: 0.5,
    29.  
    30. label: {
    31. text: 'Area Marker',
    32. bottomState: {
    33. backgroundColor: '#b1b1ff',
    34. offsetX: 10,
    35. offsetY: 10,
    36. },
    37.  
    38. alpha: 1,
    39. angle: 0,
    40. backgroundColor: '#ffe6e6',
    41. borderColor: 'red',
    42. borderRadius: '3px',
    43. borderWidth: 1,
    44. fontColor: 'red',
    45. fontFamily: 'Courier',
    46. fontSize: 10,
    47. fontStyle: 'normal',
    48. fontWeight: 'normal',
    49. lineStyle: 'solid',
    50. offsetR: 50,
    51. padding: 5,
    52. textAlign: 'left',
    53. textAlpha: 1,
    54. width: '100%'
    55. }
    56. },
    57. {
    58. type: 'line',
    59. range: [70],
    60.  
    61. alpha: 1,
    62. lineColor: 'red',
    63. lineStyle: 'solid',
    64. lineWidth: 3,
    65.  
    66. label: {
    67. text: 'Line Marker',
    68. bottomState: {
    69. backgroundColor: '#b1b1ff',
    70. offsetX: 10,
    71. offsetY: 10,
    72. },
    73.  
    74. alpha: 1,
    75. angle: 0,
    76. backgroundColor: '#ffe6e6',
    77. borderColor: 'red',
    78. borderRadius: '3px',
    79. borderWidth: 1,
    80. fontColor: 'red',
    81. fontFamily: 'Courier',
    82. fontSize: 10,
    83. fontStyle: 'normal',
    84. fontWeight: 'normal',
    85. lineStyle: 'solid',
    86. offsetR: -5,
    87. padding: 5,
    88. textAlign: 'left',
    89. textAlpha: 1,
    90. width: '100%',
    91. }
    92. }
    93. ],
    94. values: '0:90:10'
    95. },
    96. series: [{
    97. values: [35]
    98. }]
    99. };
    100.  
    101. zingchart.render({
    102. id: 'myChart',
    103. data: chartConfig,
    104. height: 400,
    105. width: '100%'
    106. });
    107. </script>
    108. </body>
    109.  
    110. </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.  
    1. let chartConfig = {
    2. type: 'gauge',
    3. scaleR: {
    4. markers: [{
    5. type: 'area',
    6. range: [10, 30],
    7.  
    8. alpha: 1,
    9. backgroundColor: '#ff4d4d',
    10. borderColor: 'red',
    11. borderWidth: 1,
    12. offsetEnd: 0.1,
    13. offsetStart: 0.5,
    14.  
    15. label: {
    16. text: 'Area Marker',
    17. bottomState: {
    18. backgroundColor: '#b1b1ff',
    19. offsetX: 10,
    20. offsetY: 10,
    21. },
    22.  
    23. alpha: 1,
    24. angle: 0,
    25. backgroundColor: '#ffe6e6',
    26. borderColor: 'red',
    27. borderRadius: '3px',
    28. borderWidth: 1,
    29. fontColor: 'red',
    30. fontFamily: 'Courier',
    31. fontSize: 10,
    32. fontStyle: 'normal',
    33. fontWeight: 'normal',
    34. lineStyle: 'solid',
    35. offsetR: 50,
    36. padding: 5,
    37. textAlign: 'left',
    38. textAlpha: 1,
    39. width: '100%'
    40. }
    41. },
    42. {
    43. type: 'line',
    44. range: [70],
    45.  
    46. alpha: 1,
    47. lineColor: 'red',
    48. lineStyle: 'solid',
    49. lineWidth: 3,
    50.  
    51. label: {
    52. text: 'Line Marker',
    53. bottomState: {
    54. backgroundColor: '#b1b1ff',
    55. offsetX: 10,
    56. offsetY: 10,
    57. },
    58.  
    59. alpha: 1,
    60. angle: 0,
    61. backgroundColor: '#ffe6e6',
    62. borderColor: 'red',
    63. borderRadius: '3px',
    64. borderWidth: 1,
    65. fontColor: 'red',
    66. fontFamily: 'Courier',
    67. fontSize: 10,
    68. fontStyle: 'normal',
    69. fontWeight: 'normal',
    70. lineStyle: 'solid',
    71. offsetR: -5,
    72. padding: 5,
    73. textAlign: 'left',
    74. textAlpha: 1,
    75. width: '100%',
    76. }
    77. }
    78. ],
    79. values: '0:90:10'
    80. },
    81. series: [{
    82. values: [35]
    83. }]
    84. };
    85.  
    86. zingchart.render({
    87. id: 'myChart',
    88. data: chartConfig,
    89. height: 400,
    90. width: '100%'
    91. });