Hi FE !
Ai
git
前端面试题
前端小tip
  • vite
  • webpack
npm
  • vue2
  • vue3
react
GitHub
Ai
git
前端面试题
前端小tip
  • vite
  • webpack
npm
  • vue2
  • vue3
react
GitHub
  • echart横坐标最后一个刻度左对齐

echart横坐标最后一个刻度左对齐

		xAxis: {
				type: "category",
				boundaryGap: false,
				axisLabel: {
					showMinLabel: true,
					formatter: (() => {
						return (value: string) => {
							const isLast = value === timeArr[timeArr.length - 1];
							const label = isLast ? `{a|${value}}` : value;
							return label;
						};
					})(),
					showMaxLabel: true,
					rich: {
						a: {
							width: 150,
							align: "left"
						}
					},
					interval: 0
				},
				axisPointer: {
					label: {
						show: true
					},
					z: 1,
					lineStyle: {
						color: "#FBAC5E",
						width: 2
					}
				},
				data: timeArr
			},
Edit this page
最近更新: 2025/12/2 01:46
Contributors: qdleader
qdleader
本站总访问量 129823次 | 本站访客数 12人