Incubator-echarts: 标题使用textAlign无法居中

Created on 24 Nov 2016  ·  2Comments  ·  Source: apache/incubator-echarts

问题简述 (One-line summary)

使用的Echarts版本是3.3.1,有标题不能居中的问题。在官网示例中也能重现。

版本及环境 (Version & Environment)

  • ECharts 版本 (ECharts version): 3.3.1
  • 浏览器类型和版本 (Browser version): Chrome 53
  • 操作系统类型和版本 (OS Version): Mac OSX

重现步骤 (Steps to reproduce)

  1. 设置 title: { text: '标题标题', textAlign: 'center' }
  2. 重现不能居中的问题

ECharts配置项 (ECharts option)

option = {
    title: { text: '标题标题', textAlign: 'center' }
}

其他信息 (Other comments)

Most helpful comment

使用

option = {
    title: { text: '标题标题', left: 'center' }
}

All 2 comments

只有 left 是具体数值的时候 textAlign 才有效,但是默认 left'left',所以忽略 textAlign 强制左对齐

使用

option = {
    title: { text: '标题标题', left: 'center' }
}
Was this page helpful?
0 / 5 - 0 ratings