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/10/31 15:50:16 UTC

[GitHub] arashdalir commented on issue #8192: subtextStyle使用rich后属性后,样式没有变化

arashdalir commented on issue #8192: subtextStyle使用rich后属性后,样式没有变化
URL: https://github.com/apache/incubator-echarts/issues/8192#issuecomment-434740463
 
 
   I also have the same problem. the `formatter` function actually is never called. `normal` is omitted as mentioned by @pissang .
   
   ```javascript
   var chart = echarts.init(document.getElementById('chart'), null, {
   	"devicePixelRatio": null,
   	"renderer": "svg",
   	"width": null,
   	"height": "600px"
   });
   chart.setOption({
   	"title": {
   		"text": "Main Title",
   		"subtext": "Sub Title",
   		"show": true,
   		"width": "100%",
   		"top": "top",
   		"left": "center",
   		"textStyle": {"color": "#306fb6"},
   		"subtextStyle": {
   			"color": "#306fb6",
   			//"formatter": '{a}\n{hr|}',
   			"formatter": function(params){
   				return params + "\n{hr|}";
   			},
   			"rich": {
   				"hr": {
   					"borderColor": "#999999",
   					"width": "100%",
   					"borderWidth": 2,
   					"height": 2,
   					"lineHeight": 10
   				}
   			}
   		}
   	}
   });
   ```

----------------------------------------------------------------
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