Skip to content

Commit

Permalink
Merge pull request #403 from pyecharts/docs-update
Browse files Browse the repository at this point in the history
Docs update
  • Loading branch information
chenjiandongx committed Feb 26, 2018
2 parents 13d25cd + 9ff86af commit 33f959e
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $ pip install pyecharts

or clone it and install it
```
$ git clone --recursive https://github.com/pyecharts/pyecharts.git
$ git clone https://github.com/pyecharts/pyecharts.git
$ cd pyecharts
$ pip install -r requirements.txt
$ python setup.py install
Expand Down
7 changes: 3 additions & 4 deletions docs/zh-cn/django.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,14 @@ from django.http import HttpResponse
from django.template import loader
from pyecharts import Line3D

from pyecharts.constants import DEFAULT_HOST

REMOTE_HOST = "https://pyecharts.github.io/assets/js"

def index(request):
template = loader.get_template('myfirstvis/pyecharts.html')
l3d = line3d()
context = dict(
myechart=l3d.render_embed(),
host=DEFAULT_HOST,
host=REMOTE_HOST,
script_list=l3d.get_js_dependencies()
)
return HttpResponse(template.render(context, request))
Expand All @@ -117,7 +116,7 @@ def line3d():

`script_list` 是 Page() 类渲染网页所需要依赖的 echarts js 库,依赖的库的数量取决于所要渲染的图形种类。

`host` 是 echarts js 库的地址,默认的地址为 http://chfw.github.io/jupyter-echarts/echarts 当然,如果你愿意你也可以改变这个地址,先克隆 https://github.com/chfw/jupyter-echarts 然后将 `echarts` 文件夹挂载在你自己的服务器上即可。
`host` 是 echarts js 库的地址,默认提供的地址为 https://pyecharts.github.io/assets/js 当然,如果你愿意你也可以改变这个地址,先克隆 https://github.com/pyecharts/assets 然后将 `js` 文件夹挂载在你自己的服务器上即可。


## Step 3: 为项目提供自己的模板
Expand Down
10 changes: 5 additions & 5 deletions docs/zh-cn/flask.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,19 +42,19 @@ $ mkdir templates
```python
import random
from pyecharts import Scatter3D
from pyecharts.constants import DEFAULT_HOST
from flask import Flask, render_template


app = Flask(__name__)

REMOTE_HOST = "https://pyecharts.github.io/assets/js"

@app.route("/")
def hello():
s3d = scatter3d()
return render_template('pyecharts.html',
myechart=s3d.render_embed(),
host=DEFAULT_HOST,
host=REMOTE_HOST,
script_list=s3d.get_js_dependencies())


Expand All @@ -75,7 +75,7 @@ def generate_3d_random_point():
```
`script_list` 是 Page() 类渲染网页所需要依赖的 echarts js 库,依赖的库的数量取决于所要渲染的图形种类。

`host` 是 echarts js 库的地址,默认的地址为 http://pyecharts.github.io/jupyter-echarts/echarts 当然,如果你愿意你也可以改变这个地址,先克隆 https://github.com/pyecharts/jupyter-echarts 然后将 `echarts` 文件夹挂载在你自己的服务器上即可。
`host` 是 echarts js 库的地址,默提供的地址为 https://pyecharts.github.io/assets/js 当然,如果你愿意你也可以改变这个地址,先克隆 https://github.com/pyecharts/assets 然后将 `js` 文件夹挂载在你自己的服务器上即可。

此时 flask-echarts 目录下为
```
Expand Down Expand Up @@ -183,10 +183,10 @@ $ flask run

```python
from pyecharts import Bar
from pyecharts.constants import DEFAULT_HOST
from pyecharts.utils import json_dumps
from flask import Flask, render_template

REMOTE_HOST = "https://pyecharts.github.io/assets/js"

app = Flask(__name__)

Expand All @@ -196,7 +196,7 @@ def hello():
_bar = bar_chart()
return render_template('pyecharts.html',
chart_id=_bar.chart_id,
host=DEFAULT_HOST,
host=REMOTE_HOST,
my_width="100%",
my_height=600,
my_option=json_dumps(_bar.options),
Expand Down
9 changes: 8 additions & 1 deletion docs/zh-cn/release-note/v032.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,18 @@ candlestick.add("日K", DATE, data, mark_point=["min", "max"],
candlestick.render()
```


## 4 加入 AppVeyor CI

一直以来 pyecharts 都只有 Travis CI,而 Travis 又只是针对 Linux 测试,现在加入了 AppVeyor CI,提供了 Windows 平台的测试功能。

## 5 pyecharts/assets

自本版本开始,将不再为 Flask/Django/.. 等 WEB 框架提供 DEFAULT_HOST,但我们为开发者新建了 pyecharts/assets 库挂载 pyecharts 所需要的所有 js 文件,可以使用下面语句替换原来的 DEFAULT_HOST
```
REMOTE_HOST = "https://pyecharts.github.io/assets/js"
```


## 5 修复了若干 BUG
* [issue#322](https://github.com/pyecharts/pyecharts/issues/322) 修复在 timeline 中不能设置多个 legend 的 bug
* [issue#357](https://github.com/pyecharts/pyecharts/issues/357) 修复 Line 图 symbol 大小不能调整的 bug
Expand Down

0 comments on commit 33f959e

Please sign in to comment.