chartSeting.js 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. import * as echarts from "echarts";
  2. import { color } from "highcharts";
  3. export const galleryLine = {
  4. tooltip: {
  5. trigger: "axis",
  6. },
  7. grid: {
  8. top: 28,
  9. left: 10,
  10. right: 26,
  11. bottom: 0,
  12. containLabel: true,
  13. },
  14. xAxis: {
  15. name: "时间",
  16. nameLocation: "end",
  17. nameGap: 4,
  18. nameTextStyle: {
  19. fontSize: 10,
  20. color: "#666666"
  21. },
  22. type: 'category',
  23. // 分割线
  24. axisTick: {
  25. show: false,
  26. },
  27. splitLine: {
  28. show: false,
  29. },
  30. axisLabel: {
  31. // interval: 0,
  32. rotate: 15,
  33. margin: 14,
  34. textStyle: {
  35. color: "#666666",
  36. fontSize: 10
  37. },
  38. },
  39. data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
  40. },
  41. yAxis: {
  42. name: "xx指标",
  43. nameLocation: "end",
  44. type: 'value',
  45. nameTextStyle: {
  46. fontSize: 10,
  47. color: "#666666"
  48. },
  49. axisTick: {
  50. show: false,
  51. },
  52. axisLine: {
  53. show: true,
  54. lineStyle: {
  55. color: "#BBBBBB",
  56. },
  57. },
  58. axisLabel: {
  59. textStyle: {
  60. color: "#666666",
  61. fontSize: 10
  62. },
  63. },
  64. // 分割线
  65. splitLine: {
  66. show: false,
  67. lineStyle: {
  68. color: "rgba(255, 255, 255, 0.1)",
  69. },
  70. },
  71. },
  72. series: [
  73. {
  74. data: [40, 58, 62, 64, 68, 74, 80],
  75. type: 'line',
  76. symbolSize: 6,
  77. itemStyle: {
  78. color: '#2199F8' // 设置数据点颜色为红色
  79. },
  80. // itemStyle: {
  81. // color: '#CECECE' // 设置数据点颜色
  82. // },
  83. // lineStyle: {
  84. // type: 'dashed', // 设置线条为虚线
  85. // width: 2, // 设置线条宽度
  86. // color: '#CECECE' // 设置线条颜色
  87. // }
  88. }
  89. ],
  90. }
  91. export const galleryIndicatorLine = {
  92. tooltip: {
  93. trigger: "axis",
  94. },
  95. legend: {
  96. icon: 'roundRect',
  97. bottom: 0,
  98. right: 10,
  99. orient: 'horizontal',
  100. itemWidth: 15,
  101. itemHeight: 5,
  102. itemGap: 20,
  103. textStyle: {
  104. align: 'left'
  105. },
  106. data: [
  107. { name: '褪绿率', textStyle: { color: '#66B9FB' }, itemStyle: {color: "#66B9FB"} },
  108. { name: '花芽率', textStyle: { color: '#1B98FC' }, itemStyle: {color: "#1B98FC"} },
  109. { name: '花蕾率', textStyle: { color: '#036CC0' }, itemStyle: {color: "#036CC0"} },
  110. { name: '生长异常', textStyle: { color: '#F7BE5A' }, itemStyle: {color: "#F7BE5A"} },
  111. { name: '病虫异常', textStyle: { color: '#F99851' }, itemStyle: {color: "#F99851"} }
  112. ]
  113. },
  114. grid: {
  115. top: 20,
  116. left: 8,
  117. right: 18,
  118. bottom: 20,
  119. containLabel: true,
  120. },
  121. xAxis: {
  122. type: 'category',
  123. boundaryGap: false,
  124. // 分割线
  125. axisTick: {
  126. show: false,
  127. },
  128. splitLine: {
  129. show: false,
  130. },
  131. axisLabel: {
  132. // interval: 0,
  133. rotate: 15,
  134. margin: 14,
  135. textStyle: {
  136. color: "#999999",
  137. fontSize: 12
  138. },
  139. },
  140. axisLine: {
  141. lineStyle: {
  142. color: "#333333",
  143. }
  144. },
  145. data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
  146. },
  147. yAxis: [{
  148. type: 'value',
  149. offset: 6,
  150. axisTick: {
  151. show: false,
  152. },
  153. axisLine: {
  154. show: false,
  155. },
  156. axisLabel: {
  157. align: "center",
  158. textStyle: {
  159. color: "#999999",
  160. fontSize: 12
  161. },
  162. },
  163. // 分割线
  164. splitLine: {
  165. lineStyle: {
  166. type: [4, 3],
  167. dashOffset: 5,
  168. color: "#333333",
  169. },
  170. },
  171. min: 0, // 最小值固定为0
  172. max: 100, // 最大值固定为100
  173. splitNumber: 5, // 设置5个分割段
  174. }],
  175. series: [
  176. {
  177. name: "褪绿率",
  178. data: [
  179. ["9/1", 10],
  180. ["9/7", 30],
  181. ["9/13", 80],
  182. ],
  183. type: 'line',
  184. smooth: true,
  185. symbol: "none",
  186. itemStyle: { color: "#66B9FB" },
  187. lineStyle: {
  188. color: "#66B9FB", // 折线颜色为红色
  189. width: 2, // 线条宽度
  190. },
  191. },
  192. {
  193. name: "花芽率",
  194. data: [
  195. ["9/7", 8],
  196. ["9/19", 50],
  197. ["9/25", 80],
  198. ],
  199. type: 'line',
  200. smooth: true,
  201. symbol: "none",
  202. itemStyle: { color: "#1B98FC" },
  203. lineStyle: {
  204. color: "#1B98FC", // 折线颜色为红色
  205. width: 2, // 线条宽度
  206. },
  207. },
  208. {
  209. name: "花蕾率",
  210. data: [
  211. ["9/19", 12],
  212. ["9/25", 30],
  213. ["10/1", 60],
  214. ["10/7", 70],
  215. ],
  216. type: 'line',
  217. smooth: true,
  218. symbol: "none",
  219. itemStyle: { color: "#036CC0" },
  220. lineStyle: {
  221. color: "#036CC0", // 折线颜色为红色
  222. width: 2, // 线条宽度
  223. },
  224. },
  225. // {
  226. // name: "物候监测",
  227. // data: [10, 25, 32, 34, 38, 44, 20],
  228. // type: 'line',
  229. // symbol: "none",
  230. // smooth: true,
  231. // itemStyle: { color: "#2199F8" },
  232. // lineStyle: {
  233. // color: "#2199F8", // 折线颜色为红色
  234. // width: 2, // 线条宽度
  235. // },
  236. // areaStyle: {
  237. // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  238. // { offset: 0, color: "rgba(33, 153, 248, 0.2)" }, // 渐变起始颜色
  239. // { offset: 1, color: "rgba(138, 203, 255, 0.02)" }, // 渐变结束颜色
  240. // ]),
  241. // },
  242. // markPoint : {
  243. // symbol: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',
  244. // symbolSize: [0, 0],
  245. // data: [
  246. // {
  247. // name: "text",
  248. // value: "催醒追肥",
  249. // xAxis: '9/13',
  250. // yAxis: 32,
  251. // symbolOffset: [0, "-50%"],
  252. // label: {
  253. // offset: [0, -22],
  254. // color: "#fff",
  255. // // backgroundColor: {
  256. // // image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAAAlCAYAAADhh6/DAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAl+SURBVHgB7VrLi6RXFT/33u9VXdWP6cckrTPEhBoTulXUCbjIZhRcGBEX0gFBBEH/gSBmIdrViPhYiK7ykEBwoWC7FBeK0i6ELJzNaBdMUmYaHaYzTj+m613f4978zr3fV11d3XlAIAldOfRX333fc399zr3nnvMJehsyhkiQETYjhA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517O3gPNN3ZGhlJBKSCxJX8XCf2Lp33PPLf3yDxyf+9Xh17714sGT/1WsUcYkiTJQjlImko6RoTGQcMOjWu9DGUtJeX53D2jnc/PVQUDTjeUV9e027DwIVDKNw+hIY9/QLYhPeWopnSqTvohA4jUrPbyuU3ExFzgUefiHvfvsZex2SLIrVpfuCv2aFPOXlxCk28MqF00RsGNaGIsncnlRNt7mHq40c+E8ZIdU2m0rH8LkB8JjFfZioSiEBMVGe+Uo9bq9LKMs4f90pzyTicGBkbD4F8aCk9a+Q9lBn0xxpzzBhw0icv2ikV2o30OkPQQOvVbDND5ZzegeQFlz+84oKqdCzy7K7+Jkedxb0PJ1cZWuWrdsvb5N1f1QWKfAeMh3PMSMssaCM7jYSzcMB08jTI33MoAvlw+8uIljIFJeE4Ifyq7iNkpO6b5pZ57WWdSdSVtzlN0FUtUHMF5jZE5yIWiMp3HIiAYM3uFcp3hqUPBg1fJTX4K0/J1oi0PP9fz2YGP0FhZzJkCnKP+ygjY2BPeucbrmnvxF2wgXba7lXkncXzZX8w8W+C5TpJmB7Xyu1fyDAgCPGLmsv07igTny5hKoMyIKcaepZAQ1KM2atqbsIzDcbmQ72Uq5oy8ureqte25Bdn4eM7d4C37WtocfN1gDmPOraGP5ZKb4w4t8ebV1+52HtXfGgXlnAB0jlbdzn5KcSA+/X0HeTjQ2SVE2WpczNBrqZqCuYr+7k3dTF8jcfh0i765AuuYedHKny/F49oMXc2q+M+cv+H7n9L76fdyeB+lchym/Bav+FcdPFcG72ZD09V0reYalhD9VsafKe8zxB8AxZty3U7URXvjq81SuPm/x7c57QR8wz2GuvsOvzZjeP3A+pA/p3dMbgAeuOPc2x5kAAAAASUVORK5CYII=",
  257. // // },
  258. // backgroundColor: "#2199F8",
  259. // padding: [2, 10, 0, 10],
  260. // height: 20,
  261. // borderRadius: 10,
  262. // // borderRadius: 10,
  263. // },
  264. // },
  265. // {
  266. // name: "mark",
  267. // xAxis: '9/13',
  268. // yAxis: 32,
  269. // value: "",
  270. // label: {
  271. // backgroundColor: "#fff",
  272. // borderWidth: 2,
  273. // borderColor: "rgba(255, 255, 255, 0.5)",
  274. // borderRadius: 8,
  275. // width: 6,
  276. // height: 6,
  277. // },
  278. // },
  279. // ]
  280. // },
  281. // },
  282. {
  283. name: "生长异常",
  284. data: [80, 88, 92, 84, 88, 74, 80],
  285. type: 'line',
  286. symbol: "none",
  287. smooth: true,
  288. itemStyle: { color: "#FFB82E" },
  289. lineStyle: {
  290. color: "#FFB82E", // 折线颜色为红色
  291. width: 2, // 线条宽度
  292. },
  293. areaStyle: {
  294. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  295. { offset: 0, color: "rgba(255, 183, 0, 0.2)" }, // 渐变起始颜色
  296. { offset: 1, color: "rgba(254, 233, 96, 0.02)" }, // 渐变结束颜色
  297. ]),
  298. },
  299. // markPoint : {
  300. // symbol: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',
  301. // symbolSize: [0, 0],
  302. // data: [
  303. // {
  304. // name: "text",
  305. // value: "冬季基肥",
  306. // xAxis: '9/19',
  307. // yAxis: 84,
  308. // symbolOffset: [0, "-50%"],
  309. // label: {
  310. // offset: [0, -22],
  311. // color: "#fff",
  312. // backgroundColor: "#FFB82E",
  313. // padding: [2, 10, 0, 10],
  314. // height: 20,
  315. // borderRadius: 10,
  316. // // borderRadius: 10,
  317. // },
  318. // },
  319. // {
  320. // name: "mark",
  321. // xAxis: '9/19',
  322. // yAxis: 84,
  323. // value: "",
  324. // label: {
  325. // backgroundColor: "#fff",
  326. // borderWidth: 2,
  327. // borderColor: "rgba(255, 255, 255, 0.5)",
  328. // borderRadius: 8,
  329. // width: 6,
  330. // height: 6,
  331. // },
  332. // },
  333. // ]
  334. // },
  335. },
  336. {
  337. name: "病虫异常",
  338. data: [40, 28, 22, 64, 28, 24, 40],
  339. type: 'line',
  340. smooth: true,
  341. symbol: "none",
  342. itemStyle: { color: "#FF7219" },
  343. lineStyle: {
  344. color: "#FF7219", // 折线颜色为红色
  345. width: 2, // 线条宽度
  346. },
  347. areaStyle: {
  348. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  349. { offset: 0, color: "rgba(255, 114, 25, 0.2)" }, // 渐变起始颜色
  350. { offset: 1, color: "rgba(255, 114, 25, 0.02)" }, // 渐变结束颜色
  351. ]),
  352. },
  353. // markPoint : {
  354. // symbol: 'path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z',
  355. // symbolSize: [0, 0],
  356. // data: [
  357. // {
  358. // name: "text",
  359. // value: "冬季清园",
  360. // xAxis: '10/1',
  361. // yAxis: 24,
  362. // symbolOffset: [0, "-50%"],
  363. // label: {
  364. // offset: [0, -22],
  365. // color: "#fff",
  366. // backgroundColor: "#FF7219",
  367. // padding: [2, 10, 0, 10],
  368. // height: 20,
  369. // borderRadius: 10,
  370. // // borderRadius: 10,
  371. // },
  372. // },
  373. // {
  374. // name: "mark",
  375. // xAxis: '10/1',
  376. // yAxis: 24,
  377. // value: "",
  378. // label: {
  379. // backgroundColor: "#fff",
  380. // borderWidth: 2,
  381. // borderColor: "rgba(255, 255, 255, 0.5)",
  382. // borderRadius: 8,
  383. // width: 6,
  384. // height: 6,
  385. // },
  386. // },
  387. // ]
  388. // },
  389. },
  390. ],
  391. }