Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【echarts使用】之xy轴刻度、文字、轴线样式、分隔线 #8

Open
yihan12 opened this issue Jul 7, 2022 · 0 comments
Open
Labels
【echarts使用】 echarts使用

Comments

@yihan12
Copy link
Owner

yihan12 commented Jul 7, 2022

隐藏x/y轴刻度

// x轴
xAxis: {
    type: 'category',
    splitLine: { show: false },
    data: ['11/25', '11/26', '11/27', '11/28', '11/29', '11/30', '12/1'],
    axisTick: {
        show: false //隐藏x轴刻度
    },
},
// y轴
yAxis: {
    type: 'category',
    splitLine: { show: false },
    data: ['11/25', '11/26', '11/27', '11/28', '11/29', '11/30', '12/1'],
    axisTick: {
        show: false //隐藏y轴刻度
    },
},

更改x/y轴文字

//x轴
xAxis: {
    type: 'category',
    // offset: 40,
    splitLine: { show: false },
    data: [],
    axisLabel: {
        show: true,
        textStyle: {
            color: '#6B6E7F',  //更改坐标轴文字颜色
            fontSize: 9      //更改坐标轴文字大小
        }
    }
},
//y轴
yAxis: {
    type: 'category',
    // offset: 40,
    splitLine: { show: false },
    data: [],
    axisLabel: {
        show: true,
        textStyle: {
            color: '#6B6E7F',  //更改坐标轴文字颜色
            fontSize: 9      //更改坐标轴文字大小
        }
    }
},

更改x/y轴线样式

// x轴
xAxis: {
    type: 'category',
    // offset: 40,
    splitLine: { show: false },
    data: [],
    axisLine: {
        show: false,
        lineStyle: {
            type: 'dashed',
            color: '#86899D'
        }
    } //0 轴线设置样式
},
// y轴
yAxis: {
    type: 'category',
    // offset: 40,
    splitLine: { show: false },
    data: [],
    axisLine: {
        show: false,
        lineStyle: {
            type: 'dashed',
            color: '#86899D'
        }
    } //0 轴线设置样式
},

x/y轴分隔线

// x轴
xAxis: {
    type: 'value',
    axisLabel: {
        show: false,
        interval: 'auto',
        formatter: '{value} AM'
    },
    axisTick: {
        show: false
    },
    splitLine: {
        show: false,
        lineStyle: {
            type: 'dashed',
            color: '#86899D'
        }
    } //设置y轴分割线样式
},
// y轴
yAxis: {
    type: 'value',
    axisLabel: {
        show: false,
        interval: 'auto',
        formatter: '{value} AM'
    },
    min: 20,
    max: 33, // y轴的展示范围
    axisTick: {
        show: false
    },
    splitLine: {
        show: false,
        lineStyle: {
            type: 'dashed',
            color: '#86899D'
        }
    } //设置y轴分割线样式
},

echarts系列

主要是echarts使用。

后续会一直更新,希望各位看官不要吝啬手中的赞。

❤️ 感谢各位的支持!!!

❤️ 如果有错误或者不严谨的地方,请务必给予指正,十分感谢!!!

❤️ 喜欢或者有所启发,欢迎 star!!!

@yihan12 yihan12 added the 【echarts使用】 echarts使用 label Jul 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
【echarts使用】 echarts使用
Projects
None yet
Development

No branches or pull requests

1 participant