Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hanson/newline-echarts
echarts 换行利器
https://github.com/hanson/newline-echarts
Last synced: 24 days ago
JSON representation
echarts 换行利器
- Host: GitHub
- URL: https://github.com/hanson/newline-echarts
- Owner: Hanson
- Created: 2016-01-25T13:30:15.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-01-25T13:44:27.000Z (almost 9 years ago)
- Last Synced: 2024-03-14T21:28:14.259Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.95 KB
- Stars: 17
- Watchers: 4
- 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)```
![参考图片](http://i.imgur.com/CluVBGb.png)