https://github.com/hanson/newline-echarts
echarts 换行利器
https://github.com/hanson/newline-echarts
Last synced: about 1 year ago
JSON representation
echarts 换行利器
- Host: GitHub
- URL: https://github.com/hanson/newline-echarts
- Owner: Hanson
- Created: 2016-01-25T13:30:15.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-01-25T13:44:27.000Z (over 10 years ago)
- Last Synced: 2025-04-14T04:11:39.419Z (about 1 year ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 17
- Watchers: 3
- Forks: 13
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# newline-echarts
###Introduce
许多人使用百度的echarts.js时候会出现数据名太长覆盖的情况,newline-echarts.js能够很好解决这种换行问题
###Usage
newline(option, 6, 'yAxis')
* 参数一:是你的option
* 参数二:是多少个字就换行
* 参数三:是x轴还是y轴 可选项 'yAxis' OR 'xAxis'
##Example
```
var chart = echarts.init(document.getElementById("main"));
var option =
{
# your options
}
option = newline(option, 6, 'yAxis')
chart.setOption(option)
```
