Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hanson/newline-echarts

echarts 换行利器
https://github.com/hanson/newline-echarts

Last synced: 24 days ago
JSON representation

echarts 换行利器

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)