关于echarts的配置

option = {
      xAxis: {
        show: true,                                  //是否显示 x 轴
        position: 'bottom',                            //x轴的位置        (可选位置top  bottom)
        offset: 0,                                     //x轴相对于默认位置的偏移,在相同的 position 上有多个 X 轴的时候有用
        type: 'category',                           //坐标轴类型        (可选value   category   time   log)
        name: 'x轴',                                //坐标轴名称
        nameLocation: 'end',                          //坐标轴名称显示位置      (可选start   center   end)
        nameTextStyle: {                               //坐标轴名称的文字样式
          color: 'black',                            //坐标轴名称的颜色
          fontSize:30,                                //坐标轴名称的大小         (用数字表示)
          fontWeight:'bold',                        //坐标轴文字加粗程度        (可选bold   bolder  lighter  normal)
          fontstyle:'normal',                        //坐标轴文字样式      (可选normal  italic   oblique)
          fontFamily:'华文行楷',                        //坐标轴文字风格        (可选楷体  宋体  华文行楷等等)
          padding: [5, 0, 2, -5]                    //坐标轴文字边距        (上右下左)
        },
        nameGap: 25,                                 //坐标轴名称与轴线之间的距离        (用数字表示)
        nameRotate: 0,                              //坐标轴名字旋转的角度值
        inverse:false,                                //是否为反向坐标轴
        axisLine: {                                    //坐标轴轴线设置
          show: true,                                  //是否显示坐标轴轴线
          symbol: ['none', 'arrow'],                  //坐标轴箭头        (可选'none'   'arrow'   ['none','arrow'])
          symbolSize: [8, 8],                         //箭头大小        ([宽度,高度])
          symbolOffset: [0, 7],                      //箭头偏移
          lineStyle: {                                //坐标轴的线
            color: 'green',                            //线的颜色
            width: 3,                                //线的粗细程度    (用数字表示)
            type: 'solid',                            //线的类型        (可选solid  dotted  dashed)
            opacity:1                                //线的透明度        (用0~1的小数表示)
          }
        },
        axisTick: {                                    //坐标轴刻度设置
          show: true,                                  //是否显示坐标轴刻度
          inside: true,                              //坐标轴刻度指向        (true表示向上   false表示向下)
          alignWithLabel:true,                        //刻度线是否和标签对齐
          length: 5,                                 //坐标轴刻度长度
          lineStyle: {                                //坐标轴刻度的样式
            color: 'black',                            //坐标轴刻度的颜色
            width: 2,                                //坐标轴刻度的粗细程度    (用数字表示)
            type: 'solid'                            //坐标轴刻度的类型        (可选solid  dotted  dashed)
          }
        },
        axisLabel: {                                //坐标轴刻度文字的设置
          show: true,                                 //是否显示
          inside: false,                             //坐标轴刻度文字指向        (true表示向上   false表示向下)
          rotate: 30,                                 //坐标轴刻度文字的旋转角度
          margin: 10,                                 //坐标轴刻度文字与轴线之间的距离
          color: 'red',                              //坐标轴刻度文字的颜色
          fontSize:17,                                //坐标轴刻度文字的大小         (用数字表示)
          fontWeight:'lighter',                        //坐标轴刻度文字的加粗程度    (可选bold   bolder  lighter  normal)
          fontstyle:'normal',                        //坐标轴刻度文字的样式          (可选normal  italic   oblique)
          fontFamily:'华文行楷',                        //坐标轴刻度文字的风格        (可选楷体  宋体  华文行楷等等)
          padding: [5, 0, 2, -5]                    //坐标轴刻度文字的边距        (上右下左)          
        },
        splitLine: {                                //网格线
          show: true,                                  //是否显示
          lineStyle: {                                //网格线样式
            color: '#0735a2',                        //网格线颜色
            width: 1,                                //网格线的加粗程度
            type: 'dashed'                            //网格线类型
          }
        },
        splitArea: {                                //网格区域
          show: true                                  //是否显示
        },
        data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']            //坐标轴刻度文字数据
      },
      yAxis: {
        show: true,                                  //是否显示 y 轴
        position: 'bottom',                            //y轴的位置        (可选位置top  bottom)
        offset: 0,                                     //y轴相对于默认位置的偏移,在相同的 position 上有多个 X 轴的时候有用
        type: 'category',                           //坐标轴类型        (可选value   category   time   log)
        name: '单位/个',                                //坐标轴名称
        nameLocation: 'end',                          //坐标轴名称显示位置      (可选start   center   end)
        nameTextStyle: {                               //坐标轴名称的文字样式
          color: 'black',                            //坐标轴名称的颜色
          fontSize:30,                                //坐标轴名称的大小         (用数字表示)
          fontWeight:'bold',                        //坐标轴文字加粗程度        (可选bold   bolder  lighter  normal)
          fontstyle:'normal',                        //坐标轴文字样式      (可选normal  italic   oblique)
          fontFamily:'华文行楷',                        //坐标轴文字风格        (可选楷体  宋体  华文行楷等等)
          padding: [5, 0, 2, -5]                    //坐标轴文字边距        (上右下左)
        },
        nameGap: 25,                                 //坐标轴名称与轴线之间的距离        (用数字表示)
        nameRotate: 0,                              //坐标轴名字旋转的角度值
        inverse:false,                                //是否为反向坐标轴
        axisLine: {                                    //坐标轴轴线设置
          show: true,                                  //是否显示坐标轴轴线
          symbol: ['none', 'arrow'],                  //坐标轴箭头        (可选'none'   'arrow'   ['none','arrow'])
          symbolSize: [8, 8],                         //箭头大小        ([宽度,高度])
          symbolOffset: [0, 7],                      //箭头偏移
          lineStyle: {                                //坐标轴的线
            color: 'green',                            //线的颜色
            width: 3,                                //线的粗细程度    (用数字表示)
            type: 'solid',                            //线的类型        (可选solid  dotted  dashed)
            opacity:1                                //线的透明度        (用0~1的小数表示)
          }
        },
        axisTick: {                                    //坐标轴刻度设置
          show: true,                                  //是否显示坐标轴刻度
          inside: true,                              //坐标轴刻度指向        (true表示向上   false表示向下)
          alignWithLabel:true,                        //刻度线是否和标签对齐
          length: 5,                                 //坐标轴刻度长度
          lineStyle: {                                //坐标轴刻度的样式
            color: 'black',                            //坐标轴刻度的颜色
            width: 2,                                //坐标轴刻度的粗细程度    (用数字表示)
            type: 'solid'                            //坐标轴刻度的类型        (可选solid  dotted  dashed)
          }
        },
        axisLabel: {                                //坐标轴刻度文字的设置
          show: true,                                 //是否显示
          inside: false,                             //坐标轴刻度文字指向        (true表示向上   false表示向下)
          rotate: 0,                                 //坐标轴刻度文字的旋转角度
          margin: 10,                                 //坐标轴刻度文字与轴线之间的距离
          color: 'red',                              //坐标轴刻度文字的颜色
          fontSize:17,                                //坐标轴刻度文字的大小         (用数字表示)
          fontWeight:'lighter',                        //坐标轴刻度文字的加粗程度    (可选bold   bolder  lighter  normal)
          fontstyle:'normal',                        //坐标轴刻度文字的样式          (可选normal  italic   oblique)
          fontFamily:'宋体',                            //坐标轴刻度文字的风格        (可选楷体  宋体  华文行楷等等)
          padding: [5, 0, 2, -5]                    //坐标轴刻度文字的边距        (上右下左)          
        },
        splitLine: {                                //网格线
          show: true,                                  //是否显示
          lineStyle: {                                //网格线样式
            color: '#0735a2',                        //网格线颜色
            width: 1,                                //网格线的加粗程度
            type: 'dashed'                            //网格线类型
          }
        },
        splitArea: {                                //网格区域
          show: true                                  //是否显示
        },
        data: ['100', '500', '1000', '1500', '2000', '2500', '3000', '4000', '5000', '6000', '7000', '8000']   //坐标轴刻度文字数据
      },
    }

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值