Commit ffb8f74c by 李伟康

commit 修改X轴

1 parent ce106020
...@@ -25,17 +25,17 @@ export const tooltipConfig = { ...@@ -25,17 +25,17 @@ export const tooltipConfig = {
// } // }
} }
export const xAxisConfig = (params) => { export const xAxisConfig = (params) => {
let { allYear } = params.searchTime
return { return {
type: 'time', type: 'time',
boundaryGap: false, boundaryGap: false,
splitLine: { splitLine: {
show: false show: false
}, },
splitNumber: allYear ? 12 : 10,
axisLabel: { axisLabel: {
interval: 0,
showMaxLabel: true, showMaxLabel: true,
formatter: function (value, index) { formatter: function (value, index) {
let { allYear } = params.searchTime
return allYear ? dayjs(value).format('MM月') : dayjs(value).format('MM/DD') return allYear ? dayjs(value).format('MM月') : dayjs(value).format('MM/DD')
} }
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!