echarts icon indicating copy to clipboard operation
echarts copied to clipboard

坐标轴名称位置偏移的问题

Open chengzhi0921 opened this issue 9 years ago • 2 comments

坐标轴名称位置偏移只能设置横向偏移 xAxis.nameGap ,不能纵向偏移,希望增加此设置项.

` 我修改了源码 var gap = axisModel.get('nameGap') || 0;

			var gapY = axisModel.get('nameGapY') || 0;//2017年3月30日21:08:43 
			//debugger;
            var extent = this.axisModel.axis.getExtent();
            var gapSignal = extent[0] > extent[1] ? -1 : 1;
            var pos = [
                nameLocation === 'start'
                    ? extent[0] - gapSignal * gap
                    : nameLocation === 'end'
                    ? extent[1] + gapSignal * gap
                    : (extent[0] + extent[1]) / 2, // 'middle'
                // Reuse labelOffset.
                nameLocation === 'middle' ? opt.labelOffset + nameDirection * gap : opt.labelOffset + gapY  //2017年3月30日21:08:43 
            ];

`

` 设置 xAxis : [ { name : "企业", nameLocation : "start", nameGap : 20, nameGapY : 25, //nameRotate : 90, nameTextStyle : { color : '#2F4554', fontWeight : 'bold', fontSize : 15 }, min : 'dataMin', type : 'category', boundaryGap : true, data : [], scale :true, axisLabel:{ interval:0, rotate :35 } } ],

`

One-line summary [问题简述]

Version & Environment [版本及环境]

  • ECharts version [ECharts 版本]:
  • Browser version [浏览器类型和版本]:
  • OS Version [操作系统类型和版本]:

Expected behaviour [期望结果]

ECharts option [ECharts配置项]

option = {

}

Other comments [其他信息]

chengzhi0921 avatar Mar 31 '17 13:03 chengzhi0921

这段代码放在什么位置好使?

arrinhzh avatar Jun 12 '17 07:06 arrinhzh

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 03 '20 08:04 stale[bot]