You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@echarts.apache.org by GitBox <gi...@apache.org> on 2018/11/15 07:50:46 UTC

[GitHub] jingxiawl opened a new issue #9410: 柱状图与折线图的双坐标图,柱状图label被折线图遮挡

jingxiawl opened a new issue #9410: 柱状图与折线图的双坐标图,柱状图label被折线图遮挡
URL: https://github.com/apache/incubator-echarts/issues/9410
 
 
   <!--
   为了方便我们能够复现和修复 bug,请遵从下面的规范描述您的问题。
   -->
   
   
   ### One-line summary [问题简述]
   
   我配置了一个图表,同时展示柱状图与折线图,柱状图的头部会有label显示,但是现在发现折线图会将柱状图的数字遮挡住。我想问哈有没有办法设置柱状图的label的层级?
   
   
   
   ### Version & Environment [版本及环境]
   + ECharts version [ECharts 版本]: 官网编辑器版本
   + Browser version [浏览器类型和版本]: chrome 版本 68.0.3440.106(正式版本)
   + OS Version [操作系统类型和版本]: win7
   
   
   
   
   
   ### Expected behaviour [期望结果]
   
   希望可以设置柱状图的label的层级,让他不被遮住
   
   
   
   ### ECharts option [ECharts配置项]
   <!-- Copy and paste your 'echarts option' here. -->
   <!-- [下方贴你的option,注意不要删掉下方 ```javascript 和 尾部的 ``` 字样。最好是我们能够直接运行的 option。如何得到能运行的 option 参见上方的 guidelines for contributing] -->
   ```javascript
   option = {
   	"legend": {
   		"data": [{
   				"name": "营业收入(亿元)",
   				"icon": "circle",
   				"textStyle": {
   					"color": "#fff",
   					"fontSize": 16
   				}
   			}, {
   				"name": "同比",
   				"icon": "circle",
   				"textStyle": {
   					"color": "#fff",
   					"fontSize": 16
   				}
   			}
   		],
   		"left": "5%"
   	},
   	"grid": {
   		"bottom": 50
   	},
   	"xAxis": [{
   			"type": "category",
   			"boundaryGap": true,
   			"data": ["2018\n年报", "2018\n年报", "2018\n年报", "2018\n月报}"],
   			"axisTick": {
   				"show": false
   			},
   			"axisLine": {
   				"lineStyle": {
   					"color": "#fff"
   				}
   			},
   			"axisLabel": {
   				"fontSize": 12,
   				"borderColor": "#ddd",
   				"borderWidth": 1,
   				"borderRadius": 6,
   				"padding": [6, 10]
   			}
   		}, {
   			"type": "category",
   			"boundaryGap": true,
   			"data": ["2018\n年报", "2018\n年报", "2018\n年报", "2018\n月报}"],
   			"axisLabel": {
   				"show": false
   			},
   			"axisLine": {
   				"show": false
   			},
   			"axisTick": {
   				"show": false
   			}
   		}
   	],
   	"yAxis": [ {
   			"type": "value",
   			"scale": true,
   			"axisLabel": {
   				"color": "#fff",
   				"formatter": "{value}%"
   			},
   			"max": 30,
   			"min": 0,
   			"interval": 6,
   			"splitLine": {
   				"show": true,
   				"lineStyle": {
   					"color": "#999"
   				}
   			},
   			"axisLine": {
   				"show": false
   			},
   			"axisTick": {
   				"show": false
   			},
   			"boundaryGap": [0.2, 0.2]
   		},{
   			"type": "value",
   			"scale": true,
   			"max": 361300,
   			"min": 0,
   			"interval": 72260,
   			"splitLine": {
   				"show": true,
   				"lineStyle": {
   					"color": "#999"
   				}
   			},
   			"axisLabel": {
   				"color": "#fff"
   			},
   			"axisLine": {
   				"show": false
   			},
   			"axisTick": {
   				"show": false
   			},
   			"boundaryGap": [0.2, 0.2]
   		}
   	],
   	"dataZoom": [{
   			"type": "inside",
   			"xAxisIndex": [0, 1],
   			"maxValueSpan": 5,
   			"startValue": 0,
   			"endValue": 4,
   			"zoomLock": true,
   			"preventDefaultMouseMove": false
   		}
   	],
   	"series": [{
   			"name": "营业收入(亿元)",
   			"type": "bar",
   			"yAxisIndex": 1,
   			"xAxisIndex": 1,
   			"barWidth": 12,
   			"data": [237025, 298048, 361299, 234646],
   			"itemStyle": {
   				"color": "#29D6F4",
   				"shadowBlur": 6,
   				"shadowColor": "rgba(0, 0, 0, 0.5)"
   			},
   			"label": {
   				"show": true,
   				"position": "top",
   				"color": "#fff",
   				"fontSize": 16,
   				"formatter": "{c}亿"
   			}
   		}, {
   			"name": "同比",
   			"type": "line",
   			
   			"lineStyle": {
   				"color": "#E7306D"
   			},
   			"symbol": "circle",
   			"symbolSize": 10,
   			"data": [16.98, 25.74, 21.22, 25.23]
   		}
   	]
   }
   
   
   ```
   
   
   
   
   ### Other comments [其他信息]
   <!-- For example: Screenshot or Online demo -->
   <!-- [例如,截图或线上实例 (JSFiddle/JSBin/Codepen)] -->
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@echarts.apache.org
For additional commands, e-mail: dev-help@echarts.apache.org