123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253 |
- import * as echarts from "echarts";
- export const galleryLine = {
- tooltip: {
- trigger: "axis",
- },
- grid: {
- top: 28,
- left: 10,
- right: 26,
- bottom: 0,
- containLabel: true,
- },
- xAxis: {
- name: "时间",
- nameLocation: "end",
- nameGap: 4,
- nameTextStyle: {
- fontSize: 10,
- color: "#9F9F9F"
- },
- type: 'category',
- // 分割线
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- axisLabel: {
- // interval: 0,
- rotate: 15,
- margin: 14,
- textStyle: {
- color: "rgba(187, 187, 187, 0.36)",
- fontSize: 10
- },
- },
- data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
- },
- yAxis: {
- name: "xx指标",
- nameLocation: "end",
- type: 'value',
- nameTextStyle: {
- fontSize: 10,
- color: "#9F9F9F"
- },
- axisTick: {
- show: false,
- },
- axisLine: {
- show: true,
- lineStyle: {
- color: "rgba(187, 187, 187, 0.36)",
- },
- },
- axisLabel: {
- textStyle: {
- color: "#666666",
- fontSize: 10
- },
- },
- // 分割线
- splitLine: {
- show: false,
- lineStyle: {
- color: "rgba(255, 255, 255, 0.1)",
- },
- },
- },
- series: [
- {
- data: [40, 58, 62, 64, 68, 74, 80],
- type: 'line',
- symbolSize: 6,
- itemStyle: {
- color: '#FFD489' // 设置数据点颜色为红色
- },
- // itemStyle: {
- // color: '#CECECE' // 设置数据点颜色
- // },
- // lineStyle: {
- // type: 'dashed', // 设置线条为虚线
- // width: 2, // 设置线条宽度
- // color: '#CECECE' // 设置线条颜色
- // }
- }
- ],
- }
- export const galleryIndicatorLine = {
- tooltip: {
- trigger: "axis",
- },
- legend: {
- icon: 'roundRect',
- top: 0,
- left: 0,
- orient: 'horizontal',
- itemWidth: 6,
- itemHeight: 2,
- itemGap: 4,
- textStyle: {
- align: 'left',
- fontSize: 10,
- },
- data: [
- { name: '褪绿率', textStyle: { color: '#66B9FB' }, itemStyle: {color: "#66B9FB"} },
- { name: '花芽率', textStyle: { color: '#1B98FC' }, itemStyle: {color: "#1B98FC"} },
- { name: '花蕾率', textStyle: { color: '#036CC0' }, itemStyle: {color: "#036CC0"} },
- { name: '生长异常', textStyle: { color: '#F7BE5A' }, itemStyle: {color: "#F7BE5A"} },
- { name: '病虫异常', textStyle: { color: '#F99851' }, itemStyle: {color: "#F99851"} }
- ]
- },
- grid: {
- top: 30,
- left: 8,
- right: 18,
- bottom: 4,
- containLabel: true,
- },
- xAxis: {
- type: 'category',
- boundaryGap: false,
- // 分割线
- axisTick: {
- show: false,
- },
- splitLine: {
- show: false,
- },
- axisLabel: {
- // interval: 0,
- rotate: 15,
- margin: 14,
- textStyle: {
- color: "#999999",
- fontSize: 12
- },
- },
- axisLine: {
- lineStyle: {
- color: "#333333",
- }
- },
- data: ['9/1', '9/7', '9/13', '9/19', '9/25', '10/1', '10/7']
- },
- yAxis: [{
- type: 'value',
- offset: 6,
- axisTick: {
- show: false,
- },
- axisLine: {
- show: false,
- },
- axisLabel: {
- align: "center",
- textStyle: {
- color: "#999999",
- fontSize: 12
- },
- },
- // 分割线
- splitLine: {
- lineStyle: {
- type: [4, 3],
- dashOffset: 5,
- color: "#333333",
- },
- },
- min: 0, // 最小值固定为0
- max: 100, // 最大值固定为100
- splitNumber: 5, // 设置5个分割段
- }],
- series: [
- {
- name: "褪绿率",
- data: [
- ["9/1", 10],
- ["9/7", 30],
- ["9/13", 80],
- ],
- type: 'line',
- smooth: true,
- symbol: "none",
- itemStyle: { color: "#66B9FB" },
- lineStyle: {
- color: "#66B9FB", // 折线颜色为红色
- width: 2, // 线条宽度
- },
- },
- {
- name: "花芽率",
- data: [
- ["9/7", 8],
- ["9/19", 50],
- ["9/25", 80],
- ],
- type: 'line',
- smooth: true,
- symbol: "none",
- itemStyle: { color: "#1B98FC" },
- lineStyle: {
- color: "#1B98FC", // 折线颜色为红色
- width: 2, // 线条宽度
- },
- },
- {
- name: "花蕾率",
- data: [
- ["9/19", 12],
- ["9/25", 30],
- ["10/1", 60],
- ["10/7", 70],
- ],
- type: 'line',
- smooth: true,
- symbol: "none",
- itemStyle: { color: "#036CC0" },
- lineStyle: {
- color: "#036CC0", // 折线颜色为红色
- width: 2, // 线条宽度
- },
- },
- {
- name: "生长异常",
- data: [80, 88, 92, 84, 88, 74, 80],
- type: 'line',
- symbol: "none",
- smooth: true,
- itemStyle: { color: "#FFB82E" },
- lineStyle: {
- color: "#FFB82E", // 折线颜色为红色
- width: 2, // 线条宽度
- },
- },
- {
- name: "病虫异常",
- data: [40, 28, 22, 64, 28, 24, 40],
- type: 'line',
- smooth: true,
- symbol: "none",
- itemStyle: { color: "#FF7219" },
- lineStyle: {
- color: "#FF7219", // 折线颜色为红色
- width: 2, // 线条宽度
- },
- },
- ],
- }
|