• 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: 'scatter',
    18. scaleX: {
    19. values: '0:100:10',
    20. item: {
    21. fontSize: 10
    22. },
    23. guide: {
    24. visible: false
    25. }
    26. },
    27. scaleY: {
    28. values: '0:100:20',
    29. item: {
    30. fontSize: 10
    31. },
    32. guide: {
    33. lineStyle: 'solid'
    34. },
    35. minorTicks: 9,
    36. minorGuide: {
    37. alpha: 1
    38. },
    39. markers: [{
    40. type: 'area',
    41. range: [0, 20],
    42. backgroundColor: '#C5CAE9'
    43. },
    44. {
    45. type: 'area',
    46. range: [20, 40],
    47. backgroundColor: '#9FA8DA'
    48. },
    49. {
    50. type: 'area',
    51. range: [40, 60],
    52. backgroundColor: '#7986CB'
    53. },
    54. {
    55. type: 'area',
    56. range: [60, 80],
    57. backgroundColor: '#5C6BC0'
    58. },
    59. {
    60. type: 'area',
    61. range: [80, 100],
    62. backgroundColor: '#3F51B5'
    63. }
    64. ],
    65. mediaRules: [{
    66. maxWidth: 400,
    67. guide: {
    68. lineColor: 'red',
    69. },
    70. minorTicks: 3
    71. }]
    72. },
    73. scaleY2: {
    74. values: '0:100:20',
    75. item: {
    76. fontSize: 10
    77. },
    78. guide: {
    79. visible: false
    80. },
    81. minorTicks: 9,
    82. },
    83. crosshairX: {
    84. alpha: 0.3,
    85. lineWidth: 5,
    86. marker: {
    87. backgroundColor: 'white',
    88. borderColor: '#3F51B5',
    89. borderWidth: 1,
    90. size: 5,
    91. },
    92. plotLabel: {
    93. alpha: 0.7,
    94. borderColor: '#303F9F',
    95. borderRadius: 3,
    96. fontColor: '#303F9F',
    97. placement: 'node-top',
    98. multiple: true,
    99. text: '<strong>%t:</strong> %v',
    100. textAlpha: 1
    101. },
    102. scaleLabel: {
    103. backgroundColor: '#303F9F',
    104. borderRadius: 3
    105. }
    106. },
    107. crosshairY: {
    108. alpha: 0.3,
    109. lineWidth: 5,
    110. type: 'multiple',
    111. scaleLabel: {
    112. backgroundColor: '#303F9F',
    113. borderRadius: 3
    114. }
    115. },
    116. plot: {
    117. marker: {
    118. backgroundColor: '#9FA8DA #3F51B5'
    119. },
    120. tooltip: {
    121. visible: false
    122. }
    123. },
    124. series: [{
    125. values: [
    126. [21.5, 23.5],
    127. [23.1, 30.3],
    128. [25.1, 34.3],
    129. [30.2, 34.2],
    130. [30.9, 29.3],
    131. [31.9, 39.9],
    132. [34.2, 50.5],
    133. [35.5, 33.3],
    134. [39.1, 39.1],
    135. [53.2, 54.3],
    136. [57.1, 60.1],
    137. [59.5, 60.5],
    138. [61.6, 61.7],
    139. [64.1, 64.2],
    140. [69.5, 70.9],
    141. [70.3, 80.9],
    142. [71.7, 63.7],
    143. [75.4, 83.4],
    144. [80.3, 89.4],
    145. [80.9, 84.3],
    146. [85.1, 83.1],
    147. [85.3, 87.5],
    148. [89.3, 84.9],
    149. [90.1, 91.2],
    150. [91.3, 95.3],
    151. [92.4, 90.8],
    152. [93.5, 98.7],
    153. [95.5, 96.5],
    154. [96.1, 90.5],
    155. [99.1, 99.1]
    156. ],
    157. text: 'Marker'
    158. }]
    159. };
    160.  
    161. zingchart.render({
    162. id: 'myChart',
    163. data: chartConfig,
    164. height: 400,
    165. width: '100%'
    166. });
    167. </script>
    168. </body>
    169.  
    170. </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: 'scatter',
    3. scaleX: {
    4. values: '0:100:10',
    5. item: {
    6. fontSize: 10
    7. },
    8. guide: {
    9. visible: false
    10. }
    11. },
    12. scaleY: {
    13. values: '0:100:20',
    14. item: {
    15. fontSize: 10
    16. },
    17. guide: {
    18. lineStyle: 'solid'
    19. },
    20. minorTicks: 9,
    21. minorGuide: {
    22. alpha: 1
    23. },
    24. markers: [{
    25. type: 'area',
    26. range: [0, 20],
    27. backgroundColor: '#C5CAE9'
    28. },
    29. {
    30. type: 'area',
    31. range: [20, 40],
    32. backgroundColor: '#9FA8DA'
    33. },
    34. {
    35. type: 'area',
    36. range: [40, 60],
    37. backgroundColor: '#7986CB'
    38. },
    39. {
    40. type: 'area',
    41. range: [60, 80],
    42. backgroundColor: '#5C6BC0'
    43. },
    44. {
    45. type: 'area',
    46. range: [80, 100],
    47. backgroundColor: '#3F51B5'
    48. }
    49. ],
    50. mediaRules: [{
    51. maxWidth: 400,
    52. guide: {
    53. lineColor: 'red',
    54. },
    55. minorTicks: 3
    56. }]
    57. },
    58. scaleY2: {
    59. values: '0:100:20',
    60. item: {
    61. fontSize: 10
    62. },
    63. guide: {
    64. visible: false
    65. },
    66. minorTicks: 9,
    67. },
    68. crosshairX: {
    69. alpha: 0.3,
    70. lineWidth: 5,
    71. marker: {
    72. backgroundColor: 'white',
    73. borderColor: '#3F51B5',
    74. borderWidth: 1,
    75. size: 5,
    76. },
    77. plotLabel: {
    78. alpha: 0.7,
    79. borderColor: '#303F9F',
    80. borderRadius: 3,
    81. fontColor: '#303F9F',
    82. placement: 'node-top',
    83. multiple: true,
    84. text: '<strong>%t:</strong> %v',
    85. textAlpha: 1
    86. },
    87. scaleLabel: {
    88. backgroundColor: '#303F9F',
    89. borderRadius: 3
    90. }
    91. },
    92. crosshairY: {
    93. alpha: 0.3,
    94. lineWidth: 5,
    95. type: 'multiple',
    96. scaleLabel: {
    97. backgroundColor: '#303F9F',
    98. borderRadius: 3
    99. }
    100. },
    101. plot: {
    102. marker: {
    103. backgroundColor: '#9FA8DA #3F51B5'
    104. },
    105. tooltip: {
    106. visible: false
    107. }
    108. },
    109. series: [{
    110. values: [
    111. [21.5, 23.5],
    112. [23.1, 30.3],
    113. [25.1, 34.3],
    114. [30.2, 34.2],
    115. [30.9, 29.3],
    116. [31.9, 39.9],
    117. [34.2, 50.5],
    118. [35.5, 33.3],
    119. [39.1, 39.1],
    120. [53.2, 54.3],
    121. [57.1, 60.1],
    122. [59.5, 60.5],
    123. [61.6, 61.7],
    124. [64.1, 64.2],
    125. [69.5, 70.9],
    126. [70.3, 80.9],
    127. [71.7, 63.7],
    128. [75.4, 83.4],
    129. [80.3, 89.4],
    130. [80.9, 84.3],
    131. [85.1, 83.1],
    132. [85.3, 87.5],
    133. [89.3, 84.9],
    134. [90.1, 91.2],
    135. [91.3, 95.3],
    136. [92.4, 90.8],
    137. [93.5, 98.7],
    138. [95.5, 96.5],
    139. [96.1, 90.5],
    140. [99.1, 99.1]
    141. ],
    142. text: 'Marker'
    143. }]
    144. };
    145.  
    146. zingchart.render({
    147. id: 'myChart',
    148. data: chartConfig,
    149. height: 400,
    150. width: '100%'
    151. });