I am trying the center the title of the echarts component by setting
title:{
text: "My Title",
textStyle:{
align: "center"
}
}
But it is not working.
I have referred the official document(https://echarts.apache.org/option.html#title.textStyle.align) on this.
JSFiddle link : http://jsfiddle.net/jeffersonswartz/y8zs5coq/5/
Thanks.
That should be title.left = 'center'
instead of title.textStyle.align
. Help you updated at http://jsfiddle.net/ovilia/06u9xpj4/ .
title.textStyle.align
is used to align the text within the position. For example, if you set title.textStyle.width
and title.textStyle.align
, they can work together.
This also works great:
title : {
text:"foo",
subtext:"bar",
x:'center'
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With