export const option = { title: { text: "Dynamic Data", }, tooltip: { trigger: "axis", axisPointer: { type: "shadow", }, }, grid: { top: "20%", right: "20%", bottom: "10%", containLabel: true, // 包含标签在内 }, xAxis: { type: "category", data: ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], axisTick: { alignWithLabel: true, }, }, toolbox: { feature: { dataView: { show: true, readOnly: false }, magicType: { show: true, type: ["line", "bar"] }, restore: { show: true }, saveAsImage: { show: true }, }, }, legend: { top: "bottom", }, yAxis: { type: "value", nameLocation: "middle", // 设置名称位置,可以是 'start', 'middle' 或 'end' nameTextStyle: { fontSize: 14, // 文字大小 color: "#333", // 文字颜色 padding: [0, 0, 30, 0], // 文字与轴线的距离 }, }, series: [ { name: "Direct", type: "bar", barWidth: "60%", data: [10, 52, 200, 334, 390, 330, 220], }, ], };