Echarts入门教程、使用总结(二)

来源:互联网 发布:java开发app后台demo 编辑:程序博客网 时间:2024/06/07 07:01

1.设置图表标题字体大小,居中显示

title : {    text : '年、月、周、日生产进仓数(日均,60"切换)',    textStyle : {        fontSize : '30'    },    x : 'center'},

2.设置x轴横轴

xAxis : [ {    type : 'category',    axisLabel : {        textStyle : {            //设置x轴字体大小           fontSize : '25'        }           },        data : [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11','12' ]    } ],

3.y轴竖轴字体大小 最小值 起始值 y轴坐标原点

yAxis : [ {            type : 'value',            scale : 'true',            axisLabel : {                textStyle : {                    //y轴字体大小                    fontSize : '25'                }            },            min : [ 19300 ]//起始点        } ],

4.设置图标显示数据 显示数据位置为上端 显示数据字体大小 设置显示数据颜色

itemStyle : {            normal : {            label : {                show : true,//数据显示                position : 'top',                textStyle : {                    fontSize : '18'                    }                },                color : '#FF7256'                }            },

5.折线图修改折线粗细 颜色 显示折线图点数据

{            name : '硫化数',            type : 'line',            itemStyle : {                normal : {                    label : {                        show : true,                        position : 'top',                        textStyle : {                            fontSize : '18'                        }                    },                    color : '#97FFFF',                    lineStyle : {                        //设置折线粗细                        width : '4'                    }                }            },            data : [ 19780, 19812, 19906, 20018, 20120 ]        } ]
原创粉丝点击