import * as echarts from 'echarts'
import 'echarts-gl'
import { setOptions, nowSize } from "./echarts";

var tooltip_normal = {		//一般tooltip形式
	trigger: "axis",
	backgroundColor: "#07353d",
	textStyle: {
		fontSize: nowSize(22),
		color: "rgb(255,255,255,0.8)"
	}
}

let jyzt = null
export function setJyzt(ele, dataIn) {
	if (jyzt) {
		jyzt.dispose()
	}

	let name = []; let area = []; let count = []
	dataIn.forEach(i => {
		name.push(i.name)
		area.push(i.area)
		count.push(i.count)
	})

	let option = {
		backgroundColor: "transparent",
		grid: {
			containLabel: true,
			left: "0%",
			right: "0%",
			top: "15%",
			bottom: "0%",
		},
		tooltip: tooltip_normal,
		legend: {
			right: '0',
			top: '0',
			itemWidth: nowSize(20), // 设置宽度
			itemHeight: nowSize(20), // 设置高度
			itemGap: nowSize(38),
			textStyle: {
				color: '#DDD',
				fontSize: nowSize(28),
			}
		},
		xAxis: [
			{
				type: 'category',
				axisLine: { show: false },
				splitLine: { show: false },
				axisTick: { show: false },
				axisLabel: {
					color: 'rgba(255, 255, 255, 1)',
					fontSize: nowSize(20),
					interval: 0,
				},
				data: name
			}
		],
		yAxis: [
			{
				type: 'value',
				axisLine: { show: false },
				axisTick: { show: false },
				splitLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: 'rgba(151, 169, 217, 0.5)'
					}
				},
				axisLabel: {
					color: 'rgba(255, 255, 255, 0.7)',
					fontSize: nowSize(20),
				}
			},
			{
				type: 'value',
				position: 'right',
				axisLine: { show: false },
				axisTick: { show: false },
				splitLine: {
					show: false,
				},
				axisLabel: {
					color: 'rgba(255, 255, 255, 0.8)',
					fontSize: nowSize(20),
				}
			}
		],
		series: [
			{
				name: '面积(亩)',
				silent: false,
				type: 'bar',
				barWidth: nowSize(16),
				barGap: 0.5,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0.5,
						color: 'rgba(0, 185, 123, 1)'
					}, {
						offset: 1,
						color: 'rgba(0, 185, 123, 0.1)'
					}]),
					opacity: 1,
				},
				yAxisIndex: 0,
				data: area,
			},
			{
				name: "面积(亩)",
				type: "scatter",
				silent: true,
				tooltip: {
					show: false
				},
				emphasis: {
					scale: false,
				},
				symbol: "rect",
				symbolSize: [nowSize(16), nowSize(5)],
				symbolOffset: ['-75%', 0],
				itemStyle: {
					color: '#00FEAA',
					opacity: 1,
				},
				data: area,
				yAxisIndex: 0,
				animationDelay: 500,
			},
			{
				name: '数量(个)',
				silent: false,
				type: 'bar',
				barWidth: nowSize(16),
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0.5,
						color: 'rgba(0, 169, 189, 1)'
					}, {
						offset: 1,
						color: 'rgba(0, 169, 189, 0.1)'
					}]),
					opacity: 1,
				},
				yAxisIndex: 1,
				data: count,
			},
			{
				name: "数量(个)",
				type: "scatter",
				silent: true,
				tooltip: {
					show: false
				},
				emphasis: {
					scale: false,
				},
				symbol: "rect",
				symbolSize: [nowSize(16), nowSize(5)],
				symbolOffset: ['75%', 0],
				itemStyle: {
					color: '#00E2FD',
					opacity: 1,
				},
				data: count,
				yAxisIndex: 1,
				animationDelay: 500,
			}
		]
	}

	jyzt = setOptions(ele, option)
}

let tdfbqk = null
export function setTdfbqk(ele, dataIn) {
	if (tdfbqk) {
		tdfbqk.dispose()
	}
	dataIn = dataIn.sort((a,b)=>b.value-a.value)

	let name = []; let value = [];
	dataIn.forEach(i => {
		name.push(i.name)
		value.push(i.value)
	})

	let option = {
		backgroundColor: 'transparent',
		grid: {
			left: "0",
			right: "0",
			bottom: "0",
			top: "6%",
			containLabel: true,
		},
		tooltip: tooltip_normal,
		yAxis: [{
			type: "category",
			inverse: true,
			axisLabel: {
				show: true,
				color: "#FFFFFF",
				fontSize: nowSize(28),
			},
			splitLine: { show: false },
			axisLine: { show: false },
			axisTick: { show: false },
			data: name
		}, {
			type: "category",
			position: 'right',
			name: '单位：万亩',
			nameLocation: 'start',
			nameGap: 0,
			nameTextStyle: {
				color: '#fff',
				fontSize: nowSize(28),
			},
			inverse: true,
			splitLine: { show: false },
			axisLine: { show: false },
			axisTick: { show: false },
			axisLabel: {
				show: true,
				color: "#FFE566",
				fontSize: nowSize(36),
				fontFamily: 'YSBTH'
			},
			data: value,
		}],
		xAxis: {
			show: false
		},
		series: [
			{
				type: "bar",
				barWidth: nowSize(28),
				itemStyle: {
					normal: {
						color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
							offset: 0,
							color: 'rgba(32, 228, 238, 0)'
						}, {
							offset: 0.95,
							color: 'rgba(32, 228, 238, 1)'
						}, {
							offset: 1,
							color: 'rgba(141, 242, 247, 1)'
						}]),
					},
				},
				data: value
			},
		],
	}

	tdfbqk = setOptions(ele, option)
}

let sqhd = null
export function setSqhd(ele, dataIn) {
	if (sqhd) {
		sqhd.dispose()
	}

	let valueSum = dataIn.reduce((pre, i) => pre + Number(i.value), 0)

	let optionData = [
		{
			value: Math.round(+dataIn[0].value / valueSum * 100),
			pos: ['14%', '50%'],
		},
		{
			value: Math.round(+dataIn[1].value / valueSum * 100),
			pos: ['48%', '50%'],
		},
		{
			value: Math.round(+dataIn[2].value / valueSum * 100),
			pos: ['85%', '50%'],
		}
	]

	let option = {
		backgroundColor: "transparent",
		series: (function () {
			var result = []
			optionData.forEach(function (item) {
				result.push(
					{
						type: 'pie',
						radius: ['82%', '68%'],
						center: item.pos,
						silent: true,
						clockwise: true,
						startAngle: 90,
						z: 1,
						data: [
							{
								value: item.value,
								name: '占比',
								itemStyle: {
									normal: {
										color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
											offset: 0,
											color: '#24ABBE'
										}, {
											offset: 1,
											color: '#C1FD88'
										}]),
									},
								},
								label: {
									normal: {
										position: 'center',
										formatter: `${item.value}%`,
										textStyle: {
											fontWeight: '700',
											color: '#FFE566',
											fontSize: nowSize(32),
										},
									},
								},
							},
							{
								value: 100 - item.value,
								name: '',
								label: {
									normal: {
										show: false,
									},
								},
								itemStyle: {
									normal: {
										color: '#507190',
									},
								},
							},
						],
					},
					{
						// 阴影
						type: 'pie',
						radius: ['100%', '0'],
						center: item.pos,
						animation: false,
						z: 0,
						clockWise: true,
						itemStyle: {
							normal: {
								color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
									offset: 0.2,
									color: 'rgba(26, 127, 120, 0.5)'
								}, {
									offset: 1,
									color: 'rgba(26, 127, 120, 0)'
								}]),
							},
						},
						label: {
							show: false,
						},
						data: [100],
					},
				)
			})
			return result
		})()
	}

	sqhd = setOptions(ele, option)
}

let nyxz = null
export function setNyxz(ele, dataIn) {
	console.log(dataIn)
	if (nyxz) {
		nyxz.dispose()
	}

	let total = dataIn.reduce((pre, cur) => { return pre + cur.value }, 0)
	var color = ['#D67500', '#969600', '#D5848B', '#6697FE', '#E8B707', '#980220']
	var data = [];
	let legendData = []
	for (var i = 0; i < dataIn.length; i++) {
		legendData.push(dataIn[i].name)
		data.push({
			value: dataIn[i].value,
			name: dataIn[i].name,
			itemStyle: {
				normal: {
					borderRadius: nowSize(10)
				}
			}
		});
	}
	let option = {
		backgroundColor: "transparent",
		color: color,
		tooltip: {
			show: true,
			formatter: function (params) {
				return params.name +"\t"+ params.data.value +"\t" + "万亩"
			},
		},
		legend: [
			{
				orient: 'verticle',
				icon: "circle",
				x: "left",
				y: 'center',
				itemGap: nowSize(40),
				data: legendData.slice(0,3),
				formatter: function (params) {
					let val = data.find(i=>i.name===params).value
					return "{title|"+params + "}\t\n{value|"+ val +"}{unit|万亩\t\n}{value|" + ((val / total) * 100).toFixed(2) + "%}"
				},
				textStyle: {
					rich: {
						title: {
							fontSize: nowSize(27),
							lineHeight: nowSize(34),
							fontWeight: 'bold',
							color: "#fff",
						},
						value: {
							fontSize: nowSize(36),
							color: "#FFE566",
							fontFamily: 'YSBTH',
						},
						unit: {
							fontSize: nowSize(20),
							color: "#fff",
							padding: [0, nowSize(5)]
						},
					}
				}
			},
			{
				orient: 'verticle',
				icon: "circle",
				x: "right",
				y: 'center',
				itemGap: nowSize(40),
				data: legendData.slice(3),
				formatter: function (params) {
					let val = data.find(i=>i.name===params).value
					return "{title|"+params + "}\t\n{value|"+ val +"}{unit|万亩\t\n}{value|" + ((val / total) * 100).toFixed(2) + "%}"
				},
				textStyle: {
					rich: {
						title: {
							fontSize: nowSize(27),
							lineHeight: nowSize(34),
							fontWeight: 'bold',
							color: "#fff",
						},
						value: {
							fontSize: nowSize(36),
							color: "#FFE566",
							fontFamily: 'YSBTH',
						},
						unit: {
							fontSize: nowSize(20),
							color: "#fff",
							padding: [0, nowSize(5)]
						},
					}
				}
			}
		],
		title: [
			{
				text: '总面积(万亩)',
				left: '48%',
				top: '41%',
				textAlign: 'center',
				textStyle: {
					color: '#fff',
					fontSize: nowSize(28),
					fontWeight: '400',
					lineHeight: nowSize(34)
				}
			},
			{
				text: total.toFixed(2),
				left: '48%',
				top: '52%',
				textAlign: 'center',
				textStyle: {
					color: '#FFE566',
					fontWeight: 'bold',
					fontSize: nowSize(42),
					fontFamily: 'YSBTH'
				}
			},
		],
		toolbox: {
			show: false
		},
		series: [{
			name: '',
			type: 'pie',
			clockWise: false,
			radius: ['42%', '50%'],
			width: "100%",
			height: "100%",
			hoverAnimation: false,
			center: ['50%', '50%'],
			itemStyle: {
				normal: {
					label: {
						show: false,
						// position: 'outside',
						// formatter: function (params) {
						// 	return "{title|"+params.name + "}\t\n{value|"+params.data.value+"}{unit|万亩\t\n}{value|" + Math.round((params.data.value / total) * 100) + "%}"
						// },
						// textStyle: {
						// 	rich: {
						// 		title: {
						// 			fontSize: nowSize(27),
						// 			lineHeight: nowSize(34),
						// 			fontWeight: 'bold',
						// 			color: "#fff",
						// 		},
						// 		value: {
						// 			fontSize: nowSize(36),
						// 			color: "#FFE566",
						// 			fontFamily: 'YSBTH',
						// 		},
						// 		unit: {
						// 			fontSize: nowSize(20),
						// 			color: "#fff",
						// 			padding: [0, nowSize(5)]
						// 		},
						// 	}
						// },
					},
					// labelLine: {
					// 	length: nowSize(30),
					// 	length2: nowSize(40),
					// 	lineStyle: {
					// 		width: nowSize(2),
					// 		color: 'rgba(255,255,255,0.5)',
					// 	}
					// }
				},
			},
			data: data
		}]
	};
	nyxz = setOptions(ele, option)
}

let yjjbnt = null
export function setYjjbnt(ele, dataIn) {
	if (yjjbnt) {
		yjjbnt.dispose()
	}
	// let total = (dataIn.reduce((pre, cur) => { return pre + cur.value }, 0)).toFixed(2)
	let total = 66.25
	var color = ['#DCDC29', '#36CE5E', '#DE6A26']
	var data = [];
	for (var i = 0; i < dataIn.length; i++) {
		data.push({
			value: dataIn[i].value,
			name: dataIn[i].name
		}, {
			value: total / 40,
			name: '',
			itemStyle: {
				normal: {
					label: {
						show: false
					},
					labelLine: {
						show: false
					},
					color: 'rgba(0, 0, 0, 0)',
					borderColor: 'rgba(0, 0, 0, 0)',
					borderWidth: 0
				}
			}
		});
	}
	let option = {
		backgroundColor: "transparent",
		color: color,
		tooltip: {
			show: false
		},
		title: [
			{
				text: '总面积\n(万亩)',
				left: '15%',
				top: '25%',
				textAlign: 'center',
				textStyle: {
					color: '#fff',
					fontSize: nowSize(26),
					fontWeight: '400',
					lineHeight: nowSize(34)
				}
			},
			{
				text: total,
				left: '15%',
				top: '52%',
				textAlign: 'center',
				textStyle: {
					color: '#FFE566',
					fontWeight: 'bold',
					fontSize: nowSize(36),
					fontFamily: 'YSBTH'
				}
			},
		],
		legend: [{
			icon: 'circle',
			data: dataIn.map(i => i.name),
			formatter: (params) => {
				let dataIndex = 0
				dataIn.forEach((i, index) => {
					if (i.name === params) {
						dataIndex = index
					}
				})
				return (
					"{title|" + params + "}{value|" + ((dataIn[dataIndex].value) / total * 100).toFixed(1) + "%}{value|" + dataIn[dataIndex].value + "}" + "{unit|万亩}"
				);
			},
			left: '32%',
			top: 'center',
			itemGap: nowSize(36),
			orient: 'vertical',
			textStyle: {
				rich: {
					title: {
						fontSize: nowSize(26),
						fontWeight: 400,
						color: "#fff",
					},
					value: {
						fontSize: nowSize(34),
						color: "#FFE566",
						fontFamily: 'YSBTH',
						padding: [0, 0, 0, nowSize(10)]
					},
					unit: {
						fontSize: nowSize(20),
						color: "#fff",
						padding: [5, 0, 0, 9]
					},
				}
			},
			itemHeight: nowSize(16),
			itemWidth: nowSize(16),
		},
		],
		toolbox: {
			show: false
		},
		series: [{
			name: '',
			type: 'pie',
			clockWise: false,
			radius: ['65%', '85%'],
			width: "100%",
			height: "100%",
			hoverAnimation: false,
			center: ['16%', '50%'],
			itemStyle: {
				normal: {
					label: { show: false }
				}
			},
			data: data
		}]
	};
	yjjbnt = setOptions(ele, option)
}

let nzgmfb = null
export function setNzgmfb(ele, dataIn) {
	if (nzgmfb) {
		nzgmfb.dispose()
	}
	let chartData = []
	dataIn.forEach(i => {
		chartData.push({title: i.title, value: Number(i.value)})
	})
	const valueBase = 250 / chartData.reduce((pre, i) => Math.max(pre, i.value), 0)
	let baseHeight = Math.round(15 / valueBase)
	chartData.forEach(i => {
		i.value += baseHeight
	})


	// 生成扇形的曲面参数方程，用于 series-surface.parametricEquation
	function getParametricEquation(startRatio, endRatio, isSelected, isHovered, k, height) {

		// 计算
		let midRatio = (startRatio + endRatio) / 2;

		let startRadian = startRatio * Math.PI * 2;
		let endRadian = endRatio * Math.PI * 2;
		let midRadian = midRatio * Math.PI * 2;

		// 如果只有一个扇形，则不实现选中效果。
		if (startRatio === 0 && endRatio === 1) {
			isSelected = false;
		}

		// 通过扇形内径/外径的值，换算出辅助参数 k（默认值 1/3）
		k = typeof k !== 'undefined' ? k : 1 / 3;

		// 计算选中效果分别在 x 轴、y 轴方向上的位移（未选中，则位移均为 0）
		let offsetX = isSelected ? Math.cos(midRadian) * 0.1 : 0;
		let offsetY = isSelected ? Math.sin(midRadian) * 1 : -1;

		// 计算高亮效果的放大比例（未高亮，则比例为 1）
		let hoverRate = isHovered ? 1.05 : 2;

		// 返回曲面参数方程
		return {

			u: {
				min: -Math.PI,
				max: Math.PI * 3,
				step: Math.PI / 32
			},

			v: {
				min: 0,
				max: Math.PI * 2,
				step: Math.PI / 20
			},

			x: function (u, v) {
				if (u < startRadian) {
					return offsetX + Math.cos(startRadian) * (1 + Math.cos(v) * k) * hoverRate;
				}
				if (u > endRadian) {
					return offsetX + Math.cos(endRadian) * (1 + Math.cos(v) * k) * hoverRate;
				}
				return offsetX + Math.cos(u) * (1 + Math.cos(v) * k) * hoverRate;
			},

			y: function (u, v) {
				if (u < startRadian) {
					return offsetY + Math.sin(startRadian) * (1 + Math.cos(v) * k) * hoverRate;
				}
				if (u > endRadian) {
					return offsetY + Math.sin(endRadian) * (1 + Math.cos(v) * k) * hoverRate;
				}
				return offsetY + Math.sin(u) * (1 + Math.cos(v) * k) * hoverRate;
			},

			z: function (u, v) {
				if (u < - Math.PI * 0.5) {
					return Math.sin(u);
				}
				if (u > Math.PI * 2.5) {
					return Math.sin(u);
				}
				return Math.sin(v) > 0 ? 1 * height : -1;
			}
		};
	}


	// 生成模拟 3D 饼图的配置项
	function getPie3D(pieData, internalDiameterRatio) {

		let series = [];
		let sumValue = 0;
		let startValue = 0;
		let endValue = 0;
		let legendData = [];
		let k = typeof internalDiameterRatio !== 'undefined' ? (1 - internalDiameterRatio) / (1 + internalDiameterRatio) : 1 / 3;

		// 为每一个饼图数据，生成一个 series-surface 配置
		for (let i = 0; i < pieData.length; i++) {

			sumValue += pieData[i].value;

			let seriesItem = {
				name: typeof pieData[i].name === 'undefined' ? `series${i}` : pieData[i].name,
				type: 'surface',
				parametric: true,
				wireframe: {
					show: false
				},
				pieData: pieData[i],
				pieStatus: {
					selected: false,
					hovered: false,
					k: k
				}
			};

			if (typeof pieData[i].itemStyle != 'undefined') {

				let itemStyle = {};

				typeof pieData[i].itemStyle.color != 'undefined' ? itemStyle.color = pieData[i].itemStyle.color : null;
				typeof pieData[i].itemStyle.opacity != 'undefined' ? itemStyle.opacity = pieData[i].itemStyle.opacity : null;

				seriesItem.itemStyle = itemStyle;
			}
			series.push(seriesItem);
		}

		// 使用上一次遍历时，计算出的数据和 sumValue，调用 getParametricEquation 函数，
		// 向每个 series-surface 传入不同的参数方程 series-surface.parametricEquation，也就是实现每一个扇形。
		for (let i = 0; i < series.length; i++) {
			endValue = startValue + series[i].pieData.value;
			// console.log(series[i]);
			series[i].pieData.startRatio = startValue / sumValue;
			series[i].pieData.endRatio = endValue / sumValue;
			series[i].parametricEquation = getParametricEquation(series[i].pieData.startRatio, series[i].pieData.endRatio, false, false, k, series[i].pieData.value);

			// 每个扇形角度等分
			// series[i].parametricEquation = getParametricEquation(i / series.length, (i + 1) / series.length, false, false, k, series[i].pieData.value);

			startValue = endValue;

			legendData.push(series[i].name);
		}


		// 添加底座
		series.push({
			silent: true,
			type: "surface",
			parametric: true,
			wireframe: {
				show: false,
			},
			itemStyle: {
				color: 'rgba(24, 94, 124, 1)',
			},
			parametricEquation: getParametricEquation(0, 1, false, false, 0.45, baseHeight)
		});


		// 准备待返回的配置项，把准备好的 legendData、series 传入。
		let option = {
			backgroundColor: 'transparent',
			grid: {
				top: '0%',
				bottom: '0%'
			},
			tooltip: {
				formatter: params => {
					if (params.seriesName !== 'mouseoutSeries') {
						return `${params.seriesName}<br/><span style="display:inline-block;margin-right:5px;border-radius:10px;width:10px;height:10px;background-color:${params.color};"></span>${option.series[params.seriesIndex].pieData.value - baseHeight}`;
					}
				},
				borderColor: "#092B46",
				backgroundColor: "#092B46",
				textStyle: {
					color: "#eee",
					fontSize: nowSize(28),
					align: 'left'
				},
			},
			legend: {
				show: false
			},
			xAxis3D: {
				min: -1,
				max: 1
			},
			yAxis3D: {
				min: -1,
				max: 1
			},
			zAxis3D: {
				min: -1,
				max: 1
			},
			grid3D: {
				show: false,
				// boxHeight: 1,
				boxHeight: valueBase,
				//top: '30%',
				bottom: '0%',
				// environment: '#021041',
				viewControl: {
					distance: 400,
					alpha: 30,
					beta: 0,
				},

			},
			series: series
		};
		return option;
	}

	// 传入数据生成 option
	let option = getPie3D([
		{
			name: chartData[0].title,
			value: chartData[0].value,
			itemStyle: {
				opacity: 0.9,
				color: 'rgba(0, 165, 255, 1)',
			}
		},
		{
			name: chartData[1].title,
			value: chartData[1].value,
			itemStyle: {
				opacity: 0.9,
				color: 'rgba(255, 246, 72, 1)',
			}
		}

	], 1.5);


	nzgmfb = setOptions(ele, option)
}

let nydbhqs = null
export function setNydbhqs(ele, dataIn) {
	if (nydbhqs) {
		nydbhqs.dispose()
	}
	let areaData = []
	let countData = []
	let xData = []
	dataIn.forEach(i => {
		areaData.push(i.landareamu)
		countData.push(i.landcnt)
		xData.push(i.year)
	})
	let option = {
		backgroundColor: 'transparent',
		grid: {
			left: '2%',
			right: '0%',
			top: '23%',
			bottom: '0%',
			containLabel: true
		},
		tooltip: tooltip_normal,
		legend: {
			x: "right",
			y: "top",
			icon: "circle",
			itemWidth: nowSize(20),
			itemHeight: nowSize(20),
			textStyle: {
				fontSize: nowSize(24),
				color: "#eee"
			},
			data: ["农用地面积", "地块数量"]
		},
		xAxis: {
			type: "category",
			data: xData,
			boundaryGap: false,
			splitLine: {
				show: false
			},
			axisTick: {
				show: true
			},
			axisLine: {
				lineStyle: {
					color: "rgba(255,255,255,0.8)"
				}
			},
			axisLabel: {
				margin: 10,
				textStyle: {
					fontSize: nowSize(22),
					color: "#DEEBFF"
				}
			}
		},
		yAxis: [
			{
				type: "value",
				position: "left",
				name: "单位/万亩",
				splitLine: {
					show: false,
					lineStyle: {
						type: 'dashed',
						color: ['rgba(255,255,255,0.2)']
					}
				},
				axisLine: {
					show: false
				},
				nameTextStyle: {
					color: "#DEEBFF",
					fontSize: nowSize(20),
				},
				axisLabel: {
					textStyle: {
						fontSize: nowSize(20),
						color: "#ddd"
					}
				}
			},
			{
				type: "value",
				name: "单位/块",
				position: "right",
				axisTick: {
					show: false
				},
				splitLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: ['rgba(255,255,255,0.2)']
					}
				},
				axisLine: {
					show: false
				},
				nameTextStyle: {
					color: "#DEEBFF",
					fontSize: nowSize(20),
				},
				axisLabel: {
					textStyle: {
						fontSize: nowSize(20),
						color: "#ddd"
					}
				}
			}],
		series: [
			{
				name: "农用地面积",	
				type: "line",
				showSymbol: false,
				data: areaData,
				itemStyle: {
					normal: {
						color: "#61bf67"
					}
				},
				lineStyle: {
					normal: {
						width: nowSize(3)
					}
				}
			}, {
				name: "地块数量",
				type: "line",
				yAxisIndex: 1,
				showSymbol: false,
				symbol: "circle",
				symbolSize: 6,
				data: countData,
				itemStyle: {
					normal: {
						color: "#e0d063"
					}
				},
				lineStyle: {
					normal: {
						width: nowSize(3)
					}
				}
		}]
	}
	nydbhqs = setOptions(ele, option)
}

let yyqdfx = null
export function setYyqdfx(ele, dataIn) {
	if (yyqdfx) {
		yyqdfx.dispose()
	}
	let yData = []
	let xData = []
	dataIn.forEach(i => {
		yData.push(i.value)
		xData.push(i.year)
	})
	let option = {
		backgroundColor: 'transparent',
		grid: {
			left: '0%',
			right: '5%',
			top: '16%',
			bottom: '0%',
			containLabel: true
		},
		xAxis: {
			type: "category",
			data: xData,
			boundaryGap: false,
			splitLine: {
				show: false
			},
			axisTick: {
				show: false
			},
			axisLine: {
				show: false
			},
			axisLabel: {
				margin: 10,
				textStyle: {
					fontSize: nowSize(20),
					color: '#F2F6FF'
				}
			}
		},
		yAxis: {
			type: "value",
			position: "left",
			name: "单位(吨)",
			splitLine: {
				show: true,
				lineStyle: {
					type: 'solid',
					color: 'rgba(128, 152, 205, 0.2)'
				}
			},
			axisLine: {
				show: false
			},
			nameTextStyle: {
				color: "#fff",
				fontSize: nowSize(20),
			},
			axisLabel: {
				margin: nowSize(30),
				textStyle: {
					fontSize: nowSize(20),
					color: '#F2F6FF'
				}
			}
		},
		series: [
			{
				name: "用药强度",	
				type: "line",
				smooth: true,
				showSymbol: true,
				data: yData,
				itemStyle: {
					normal: {
						label: {
							show: true,
							color: "rgba(255, 227, 89, 1)",
							fontFamily: 'YSBTH',
							fontSize: nowSize(36)
						},
						color: 'rgba(38, 254, 147, 1)'
					}
				},
				lineStyle: {
					normal: {
						width: nowSize(3),
						color: "rgba(38, 254, 147, 1)"
					}
				}
			}
		]
	}
	yyqdfx = setOptions(ele, option)
}

let xsqs = null
export function setXsqs(ele, dataIn) {
	if (xsqs) {
		xsqs.dispose()
	}

	let xData = []; let sales = []; let pay = []; let subsidy = []
	dataIn.forEach(i => {
		xData.push(i.time)
		sales.push(i.sales)
		pay.push(i.pay)
		subsidy.push(i.subsidy)
	})

	let option = {
		backgroundColor: "transparent",
		grid: {
			containLabel: true,
			left: "0%",
			right: "0%",
			top: "15%",
			bottom: "0%",
		},
		tooltip: tooltip_normal,
		legend: {
			right: '0',
			top: '0',
			itemWidth: nowSize(20), // 设置宽度
			itemHeight: nowSize(5), // 设置高度
			itemGap: nowSize(38),
			textStyle: {
				color: '#DDD',
				fontSize: nowSize(22),
			}
		},
		xAxis: [
			{
				type: 'category',
				axisLine: { show: false },
				splitLine: { show: false },
				axisTick: { show: false },
				axisLabel: {
					color: 'rgba(255, 255, 255, 1)',
					fontSize: nowSize(20),
					interval: 0,
				},
				data: xData
			}
		],
		yAxis: {
			type: 'value',
			name: '单位(万)',
			axisLine: { show: false },
			axisTick: { show: false },
			splitLine: {
				show: true,
				lineStyle: {
					type: 'dashed',
					color: 'rgba(151, 169, 217, 0.5)'
				}
			},
			axisLabel: {
				color: 'rgba(255, 255, 255, 0.8)',
				fontSize: nowSize(20),
			},
			nameTextStyle: {
				color: "#fff",
				fontSize: nowSize(20),
				padding: nowSize(25)
			},
		},
		series: [
			{
				name: '销售金额',
				silent: false,
				type: 'bar',
				barWidth: nowSize(10),
				barGap: 1,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(255, 255, 255, 1)'
					}, {
						offset: 1,
						color: 'rgba(252, 255, 11, 1)'
					}]),
					opacity: 1,
				},
				data: sales,
			},
			{
				name: '自筹金额',
				silent: false,
				type: 'bar',
				barWidth: nowSize(10),
				barGap: 1,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(255, 255, 255, 1)'
					}, {
						offset: 1,
						color: 'rgba(0, 178, 38, 1)'
					}]),
					opacity: 1,
				},
				data: pay,
			},
			{
				name: '补贴金额',
				silent: false,
				type: 'bar',
				barWidth: nowSize(10),
				barGap: 1,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(255, 255, 255, 1)'
					}, {
						offset: 1,
						color: 'rgba(0, 150, 155, 1)'
					}]),
					opacity: 1,
				},
				data: subsidy,
			},
		]
	}

	xsqs = setOptions(ele, option)
}

let sdbtfx = null
export function setSdbtfx(ele, dataIn) {
	if (sdbtfx) {
		sdbtfx.dispose()
	}

	let dataFormat = {
		year: [], money_zz: [], money_jcy: [], money_jzb: [], area_jcy: [], area_zz: [], area_jzb: []
	}
	dataIn.forEach(i => {
		Object.keys(dataFormat).forEach(j => {
			dataFormat[j].push(i[j])
		})
	})

	let option = {
		backgroundColor: "transparent",
		grid: {
			containLabel: true,
			left: "0%",
			right: "0%",
			top: "22%",
			bottom: "0%",
		},
		tooltip: tooltip_normal,
		legend: {
			right: '0',
			top: '0',
			itemWidth: nowSize(30), // 设置宽度
			itemHeight: nowSize(4), // 设置高度
			itemGap: nowSize(10),
			textStyle: {
				color: '#DDD',
				fontSize: nowSize(22),
			},
			formatter: function(value) {
				return value.slice(0,-4)
			},
			data: ['水稻种植补贴资金','水稻机插秧补贴资金','水稻机直播补贴资金']
		},
		xAxis: [
			{
				type: 'category',
				axisLine: { show: false },
				splitLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: ['rgba(255,255,255,0.1)']
					}
				},
				axisTick: { show: false },
				axisLabel: {
					color: 'rgba(255, 255, 255, 1)',
					fontSize: nowSize(20),
					interval: 0,
				},
				data: dataFormat.year
			}
		],
		yAxis: [
			{
				type: "value",
				position: "left",
				name: "单位:万",
				splitLine: {
					show: false,
				},
				axisLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: ['rgba(255,255,255,0.1)']
					}
				},
				nameTextStyle: {
					color: "#DEEBFF",
					fontSize: nowSize(20),
				},
				axisLabel: {
					textStyle: {
						fontSize: nowSize(20),
						color: "#ddd"
					}
				}
			},
			{
				type: "value",
				name: "单位:亩",
				position: "right",
				axisTick: {
					show: false
				},
				splitLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: ['rgba(255,255,255,0.1)']
					}
				},
				axisLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: ['rgba(255,255,255,0.1)']
					}
				},
				nameTextStyle: {
					color: "#DEEBFF",
					fontSize: nowSize(20),
				},
				axisLabel: {
					textStyle: {
						fontSize: nowSize(20),
						color: "#ddd"
					}
				}
			}
		],
		series: [
			{
				name: '水稻种植补贴资金',
				silent: false,
				type: 'bar',
				barWidth: nowSize(14),
				barGap: 0.8,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(201,255,243,0.8)'
					},{
						offset: 0.5,
						color: 'rgba(23,218,174,0.75)'
					},{
						offset: 1,
						color: 'rgba(5,69,55,0.64)'
					}]),
					opacity: 1,
				},
				yAxisIndex: 0,
				data: dataFormat.money_zz,
			},
			{
				name: '水稻机插秧补贴资金',
				silent: false,
				type: 'bar',
				barWidth: nowSize(14),
				barGap: 0.8,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(164,228,255,0.8)'
					},{
						offset: 0.5,
						color: 'rgba(36,163,216,0.75)'
					},{
						offset: 1,
						color: 'rgba(10,55,74,0.64)'
					}]),
					opacity: 1,
				},
				yAxisIndex: 0,
				data: dataFormat.money_jcy,
			},
			{
				name: '水稻机直播补贴资金',
				silent: false,
				type: 'bar',
				barWidth: nowSize(14),
				barGap: 0.8,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(250,255,201,0.8)'
					},{
						offset: 0.5,
						color: 'rgba(194,217,24,0.75)'
					},{
						offset: 1,
						color: 'rgba(61,69,5,0.64)'
					}]),
					opacity: 1,
				},
				yAxisIndex: 0,
				data: dataFormat.money_jzb,
			},
			{
				name: "水稻种植补贴面积",	
				type: "line",
				smooth: true,
				showSymbol: false,
				itemStyle: {
					normal: {
						color: 'rgba(23,218,174,0.75)'
					}
				},
				lineStyle: {
					width: nowSize(1),
					color: "rgba(23,218,174,0.75)",
					shadowColor: 'rgba(0, 0, 0, 0.9)',
					shadowBlur: nowSize(5),
					shadowOffsetY: nowSize(5)
				},
				yAxisIndex: 1,
				data: dataFormat.area_zz,
			},
			{
				name: "水稻机插秧补贴面积",	
				type: "line",
				smooth: true,
				showSymbol: false,
				itemStyle: {
					normal: {
						color: 'rgba(36,163,216,0.75)'
					}
				},
				lineStyle: {
					width: nowSize(1),
					color: "rgba(36,163,216,0.75)",
					shadowColor: 'rgba(0, 0, 0, 0.9)',
					shadowBlur: nowSize(5),
					shadowOffsetY: nowSize(5)
				},
				yAxisIndex: 1,
				data: dataFormat.area_jcy,
			},
			{
				name: "水稻机直播补贴面积",	
				type: "line",
				smooth: true,
				showSymbol: false,
				itemStyle: {
					normal: {
						color: 'rgba(194,217,24,0.75)'
					}
				},
				lineStyle: {
					width: nowSize(1),
					color: "rgba(194,217,24,0.75)",
					shadowColor: 'rgba(0, 0, 0, 0.9)',
					shadowBlur: nowSize(5),
					shadowOffsetY: nowSize(5)
				},
				yAxisIndex: 1,
				data: dataFormat.area_jzb,
			},
		]
	}

	sdbtfx = setOptions(ele, option)
}

let bthz = null
export function setBthzfx(ele, dataIn) {
	if (bthz) {
		bthz.dispose()
	}

	let xData = []; let areaArr = []; let moneyArr = []
	dataIn.forEach(i => {
		xData.push(i.cata)
		areaArr.push(i.area)
		moneyArr.push(i.money)
	})

	let option = {
		backgroundColor: "transparent",
		grid: {
			containLabel: true,
			left: "0%",
			right: "0%",
			top: "35%",
			bottom: "0%",
		},
		tooltip: tooltip_normal,
		legend: {
			right: '0',
			top: '0',
			itemWidth: nowSize(30), // 设置宽度
			itemHeight: nowSize(8), // 设置高度
			itemGap: nowSize(25),
			textStyle: {
				color: '#DDD',
				fontSize: nowSize(24),
			}
		},
		xAxis: [
			{
				type: 'category',
				axisLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(255,255,255,0.2)',
					}
				},
				splitLine: { show: false },
				axisTick: { show: false },
				axisLabel: {
					color: 'rgba(255, 255, 255, 1)',
					fontSize: nowSize(26),
					interval: 0,
				},
				data: xData
			}
		],
		yAxis: [
			{
				type: "value",
				name: "单位:亩",
				position: "left",
				axisTick: {
					show: false
				},
				splitLine: {
					show: false
				},
				axisLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(255,255,255,0.2)',
					}
				},
				nameTextStyle: {
					color: "#DEEBFF",
					fontSize: nowSize(20),
				},
				axisLabel: {
					textStyle: {
						fontSize: nowSize(20),
						color: "#ddd"
					}
				}
			},
			{
				type: "value",
				position: "right",
				name: "单位:万",
				splitLine: {
					show: false,
				},
				axisLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(255,255,255,0.2)',
					}
				},
				nameTextStyle: {
					color: "#DEEBFF",
					fontSize: nowSize(20),
				},
				axisLabel: {
					textStyle: {
						fontSize: nowSize(20),
						color: "#ddd"
					}
				}
			}
		],
		series: [
			{
				name: '补贴面积',
				silent: false,
				type: 'bar',
				barWidth: nowSize(28),
				barGap: 0.1,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(95, 178, 176, 1)'
					}, {
						offset: 1,
						color: 'rgba(95, 178, 176, 0.5)'
					}]),
					opacity: 1,
				},
				data: areaArr,
				yAxisIndex: 0
			},
			{
				name: '补贴金额',
				silent: false,
				type: 'bar',
				barWidth: nowSize(28),
				barGap: 0.1,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(89, 186, 255, 1)'
					}, {
						offset: 1,
						color: 'rgba(89, 186, 255, 0.5)'
					}]),
					opacity: 1,
				},
				data: moneyArr,
				yAxisIndex: 1
			}
		]
	}

	bthz = setOptions(ele, option)
}

let clqs = null
export function setClqs(ele, dataIn) {
	if (clqs) {
		clqs.dispose()
	}

	const itemNameArr = Object.keys(dataIn[0]).slice(1)
	let xData = []; let yData = {}
	itemNameArr.forEach(name => {
		yData[name] = []
	})

	dataIn.forEach(row => {
		xData.push(row.time)
		Object.keys(yData).forEach(key => {
			yData[key].push(row[key])
		})
	})

	const colorArr = [
		{ start: '#17DAAE', end: '#009977' },
		{ start: '#C2D918', end: '#758B08' },
		{ start: '#24A2D7', end: '#006D9A' }
	]

	let seriesArr = []

	Object.keys(yData).forEach((key, index) => {
		seriesArr.push({
			name: key,	
			type: "line",
			smooth: true,
			showSymbol: false,
			itemStyle: {
				normal: {
					color: colorArr[index].start
				}
			},
			lineStyle: {
				width: nowSize(2),
				color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
					offset: 0,
					color: colorArr[index].start
				}, {
					offset: 1,
					color: colorArr[index].end
				}]),
				shadowColor: 'rgba(0, 0, 0, 0.9)',
				shadowBlur: nowSize(5),
				shadowOffsetY: nowSize(5)
			},
			data: yData[key],
		})
	})

	let option = {
		backgroundColor: "transparent",
		grid: {
			containLabel: true,
			left: "0%",
			right: "5%",
			top: "18%",
			bottom: "0%",
		},
		tooltip: tooltip_normal,
		legend: {
			show: Object.keys(yData).length>1,
			right: '0',
			top: '0',
			itemWidth: nowSize(30), // 设置宽度
			itemHeight: nowSize(4), // 设置高度
			itemGap: nowSize(22),
			textStyle: {
				color: '#eee',
				fontSize: nowSize(24),
			}
		},
		xAxis: [
			{
				type: 'category',
				axisLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(255,255,255,0.2)',
					}
				},
				splitLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: 'rgba(255,255,255,0.1)',
					}
				},
				axisTick: { show: false },
				axisLabel: {
					color: 'rgba(255, 255, 255, 1)',
					fontSize: nowSize(26),
					interval: 0,
				},
				boundaryGap: false,
				data: xData
			}
		],
		yAxis: [
			{
				type: "value",
				name: "单位:吨",
				position: "left",
				axisTick: { show: false },
				splitLine: {
					show: true,
					lineStyle: {
						type: 'dashed',
						color: 'rgba(255,255,255,0.1)',
					}
				},
				axisLine: {
					show: false
				},
				nameTextStyle: {
					color: "#eee",
					fontSize: nowSize(22),
				},
				axisLabel: {
					textStyle: {
						fontSize: nowSize(22),
						color: "#eee"
					}
				}
			}
		],
		series: seriesArr
	}

	clqs = setOptions(ele, option)
}

let lnxm = null
export function setLnxm(ele, dataIn) {
	if(lnxm) {
		lnxm.dispose()
	}

	let xData = []; let data_zd = []; let data_ds = []
	dataIn.forEach(row => {
		xData.push(row.year)
		data_zd.push(row.zd)
		data_ds.push(row.ds)
	})

	let option = {
		backgroundColor: "transparent",
		grid: {
			containLabel: true,
			left: "0%",
			right: "0%",
			top: "15%",
			bottom: "0%",
		},
		tooltip: tooltip_normal,
		legend: {
			right: '0',
			top: '0',
			itemWidth: nowSize(30), // 设置宽度
			itemHeight: nowSize(8), // 设置高度
			itemGap: nowSize(25),
			textStyle: {
				color: '#eee',
				fontSize: nowSize(26),
			}
		},
		xAxis: [
			{
				type: 'category',
				axisLine: {
					show: true,
					lineStyle: {
						type: 'solid',
						color: 'rgba(255,255,255,0.2)',
					}
				},
				splitLine: { show: false },
				axisTick: { show: false },
				axisLabel: {
					color: 'rgba(255, 255, 255, 1)',
					fontSize: nowSize(26),
					interval: 0,
				},
				data: xData
			}
		],
		yAxis: {
			type: "value",
			axisTick: {
				show: false
			},
			splitLine: {
				show: true,
				lineStyle: {
					type: 'dashed',
					color: 'rgba(255,255,255,0.2)',
				}
			},
			axisLine: {
				show: false
			},
			axisLabel: {
				textStyle: {
					fontSize: nowSize(24),
					color: "#ddd"
				}
			}
		},
		series: [
			{
				name: '都市项目',
				type: 'bar',
				barWidth: nowSize(16),
				barGap: 0.3,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(164,228,255,0.8)'
					}, {
						offset: 0.5,
						color: 'rgba(36,163,216,0.75)'
					}, {
						offset: 1,
						color: 'rgba(10,55,74,0.64)'
					}]),
					opacity: 1,
				},
				data: data_ds,
			},
			{
				name: '重点项目',
				type: 'bar',
				barWidth: nowSize(16),
				barGap: 0.3,
				itemStyle: {
					color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
						offset: 0,
						color: 'rgba(201,255,243,0.8)'
					}, {
						offset: 0.5,
						color: 'rgba(23,218,174,0.75)'
					}, {
						offset: 1,
						color: 'rgba(5,69,55,0.64)'
					}]),
					opacity: 1,
				},
				data: data_zd,
			},
		]
	}

	lnxm = setOptions(ele, option)
}

let tzl = null
export function setTzl(ele, dataIn) {
	if(tzl) {
		tzl.dispose()
	}

	const itemNameArr = Object.keys(dataIn[0]).slice(1)
	let xData = []; let yData = {}
	itemNameArr.forEach(name => {
		yData[name] = []
	})

	dataIn.forEach(i => {
		xData.push(i.time)
		Object.keys(yData).forEach(key => {
			yData[key].push(i[key])
		})
	})

	let seriesArr =[]
	const colorArr = [
		{ start: '#17DAAE', end: '#009977' },	//绿
		{ start: '#C2D918', end: '#758B08' },	//黄
		{ start: '#24A2D7', end: '#006D9A' },	//蓝
		{ start: '#CA7313', end: '#936208' },	//橙
	]
	Object.keys(yData).forEach((key,index) => {
		seriesArr.push({
			name: key,	
			type: "line",
			smooth: true,
			showSymbol: false,
			itemStyle: {
				normal: {
					color: colorArr[index].start
				}
			},
			lineStyle: {
				width: nowSize(2),
				color: new echarts.graphic.LinearGradient(0, 0, 1, 0, [{
					offset: 0,
					color: colorArr[index].start
				}, {
					offset: 1,
					color: colorArr[index].end
				}]),
				shadowColor: 'rgba(0, 0, 0, 0.9)',
				shadowBlur: nowSize(5),
				shadowOffsetY: nowSize(5)
			},
			data: yData[key],
		})
	})

	let option = {
		backgroundColor: 'transparent',
		grid: {
			left: '0%',
			right: '5%',
			top: '16%',
			bottom: '0%',
			containLabel: true
		},
		legend: {
			show: true,
			right: '0',
			top: '0',
			itemWidth: nowSize(30), // 设置宽度
			itemHeight: nowSize(4), // 设置高度
			itemGap: nowSize(22),
			textStyle: {
				color: '#eee',
				fontSize: nowSize(22),
			}
		},
		tooltip: tooltip_normal,
		xAxis: {
			type: "category",
			data: xData,
			boundaryGap: false,
			splitLine: {
				show: true,
				lineStyle: {
					type: 'dashed',
					color: 'rgba(128, 152, 205, 0.2)'
				}
			},
			axisTick: { show: false },
			axisLine: {
				show: true,
				lineStyle: {
					type: 'solid',
					color: ['rgba(255,255,255,0.5)']
				}
			},
			axisLabel: {
				margin: 10,
				textStyle: {
					fontSize: nowSize(24),
					color: '#F2F6FF'
				}
			}
		},
		yAxis: {
			type: "value",
			position: "left",
			name: "单位(吨)",
			splitLine: {
				show: true,
				lineStyle: {
					type: 'dashed',
					color: 'rgba(128, 152, 205, 0.2)'
				}
			},
			axisLine: {
				show: false
			},
			nameTextStyle: {
				color: "#fff",
				fontSize: nowSize(22),
			},
			axisLabel: {
				margin: nowSize(30),
				textStyle: {
					fontSize: nowSize(20),
					color: '#F2F6FF'
				}
			}
		},
		series: seriesArr
	}

	tzl = setOptions(ele, option)
}

let whhcl = null
export function setWhhcl(ele, dataIn) {
	if (whhcl) {
		whhcl.dispose()
	}

	let xData = []; let yData = [];
	dataIn.forEach(i => {
		xData.push(i.month)
		yData.push(i.value)
	})

	let option = {
		backgroundColor: 'transparent',
		grid: {
			left: "0",
			right: "0",
			bottom: "0",
			top: "18%",
			containLabel: true,
		},
		tooltip: tooltip_normal,
		yAxis: {
			type: "value",
			name: '单位:吨',
			nameTextStyle: {
				color: '#fff',
				fontSize: nowSize(26),
			},
			splitLine: { show: true, lineStyle: { type: 'dashed', color: 'rgba(255,255,255,0.2)'} },
			axisLine: { show: false },
			axisTick: { show: false },
			axisLabel: {
				show: true,
				color: "#fff",
				fontSize: nowSize(26),
			},
		},
		xAxis: {
			type: "category",
			data: xData,
			splitLine: {
				show: false
			},
			axisTick: { show: false },
			axisLine: {
				show: true,
				lineStyle: {
					type: 'solid',
					color: ['rgba(255,255,255,0.5)']
				}
			},
			axisLabel: {
				margin: 10,
				textStyle: {
					fontSize: nowSize(26),
					color: '#fff'
				}
			}
		},
		series: [
			{
				type: "bar",
				barWidth: nowSize(24),
				itemStyle: {
					normal: {
						color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [{
							offset: 0,
							color: '#A2D9D0'
						}, {
							offset: 0.5,
							color: '#069177'
						}, {
							offset: 1,
							color: '#06443C'
						}]),
					},
				},
				data: yData
			},
		],
	}

	whhcl = setOptions(ele, option)
}