Skip to content

Commit

Permalink
Merge pull request pyecharts#732 from pyecharts/dev
Browse files Browse the repository at this point in the history
Dev -> Master - > Release v0.5.10
  • Loading branch information
chenjiandongx authored Sep 4, 2018
2 parents fd191e5 + 9b59a19 commit 3d94acf
Show file tree
Hide file tree
Showing 88 changed files with 2,069 additions and 1,366 deletions.
3 changes: 3 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[settings]
sections=FUTURE, STDLIB, FIRSTPARTY, THIRDPARTY, LOCALFOLDER
KNOWN_FIRST_PARTY=jinja2, lml, pyecharts_javascripthon, PIL
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ python:
- "3.7-dev"
- "3.6"
- "3.5"
- "3.4"
- "2.7"
before_install:
- pip install -r test/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
</p>
<h1 align="center">pyecharts</h1>
<p align="center">
<em>pyecharts is a library to generate charts using Echarts. It simply provides the interface of 28+ kinds of charts between Echarts and Python.</em>
<em>pyecharts is a library to generate charts using Echarts. It simply provides the interface of 30+ kinds of charts between Echarts and Python.</em>
</p>
<p align="center">
<a href="https://travis-ci.org/pyecharts/pyecharts">
Expand Down
4 changes: 2 additions & 2 deletions docs/_coverpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

> A Python Echarts Plotting Library.
* Chart: 28+ kinds of charts
* Chart: 30+ kinds of charts
* Map: 300+ Chinese cities / 200+ countries and regions
* Platforms: Pure Python / Jupyter Notebook / Web Framework


[GitHub](https://github.com/pyecharts/pyecharts/)
[Get Started](zh-cn/prepare)
[Get Started](zh-cn/prepare)
4 changes: 2 additions & 2 deletions docs/_navbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
- [pyecharts-snapshot](https://github.com/pyecharts/pyecharts-snapshot)
- [jupyter-echarts-pypkg](https://github.com/pyecharts/jupyter-echarts-pypkg)
- [团队](zh-cn/team)
- [支持 pyecharts](zh-cn/donate)
- 语言
- [捐赠](zh-cn/donate)
- Language
- [中文](/zh-cn/)
- [English](/en-us/)
93 changes: 92 additions & 1 deletion docs/en-us/charts.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ lineStyle:line style for Line, Polar, Radar, Graph, Parallel.
* line_type -> str
Line type,it can be 'solid', 'dashed', 'dotted'

grid3D:gird3D components in cartesian coordinate system(Bar3D, Line3D, Scatter3D)
grid3D:gird3D components in cartesian coordinate system(Bar3D, Line3D, Scatter3D, Surface3D)

* grid_width -> int
Width of grid component. Adaptive by default.
Expand Down Expand Up @@ -1854,6 +1854,97 @@ scatter3D.render()

**Tip:** more details aboutt gird3D,please refer to [Global-options](https://github.com/chenjiandongx/pyecharts/blob/master/document/en-us/documentation.md#Global-options)


## Surface3D
Surface3D.add() signatures
```python
add(name, data,
grid3d_opacity=1, **kwargs)
```
* name -> str
Series name used for displaying in tooltip and filtering with legend,or updaing data and configuration with setOption.
* data -> [list]/ndarray
data item,1 row is a data unit,1 column is a field data
* grid3d_opacity -> int
default is 1(opacity)

```python
import math

from pyecharts import Surface3D


def create_surface3d_data():
for t0 in range(-60, 60, 1):
y = t0 / 60
for t1 in range(-60, 60, 1):
x = t1 / 60
if math.fabs(x) < 0.1 and math.fabs(y) < 0.1:
z = '-'
else:
z = math.sin(x * math.pi) * math.sin(y * math.pi)
yield [x, y, z]

range_color = [
"#313695",
"#4575b4",
"#74add1",
"#abd9e9",
"#e0f3f8",
"#ffffbf",
"#fee090",
"#fdae61",
"#f46d43",
"#d73027",
"#a50026",
]

_data = list(create_surface3d_data())
surface3d = Surface3D("3D 曲面图示例", width=1200, height=600)
surface3d.add(
"",
_data,
is_visualmap=True,
visual_range_color=range_color,
visual_range=[-3, 3],
grid3d_rotate_sensitivity=5,
)
surface3d.render()
```
![surface3d-demo](https://user-images.githubusercontent.com/19553554/44899702-0dba8680-ad35-11e8-95fd-4bc21e673b8b.gif)

**曲面波图**
```python
import math

from pyecharts import Surface3D


def create_surface3d_data():
for t0 in range(-30, 30, 1):
y = t0 / 10
for t1 in range(-30, 30, 1):
x = t1 / 10
z = math.sin(x * x + y * y) * x / 3.14
yield [x, y, z]

data = list(create_surface3d_data())
surface3D = Surface3D("3D 曲面图", width=1200, height=600)
surface3D.add(
"",
data,
is_visualmap=True,
visual_range=[-1, 1],
visual_range_color=range_color,
)

surface3D.render()
```
![surface3d-demo](https://user-images.githubusercontent.com/19553554/44898394-60923f00-ad31-11e8-81a7-5d35214490cd.gif)

**Note:** more details aboutt gird3D,please refer to [Global-options](https://github.com/chenjiandongx/pyecharts/blob/master/document/en-us/documentation.md#Global-options)


## WordCloud
WordCloud.add() signatures
```python
Expand Down
2 changes: 1 addition & 1 deletion docs/zh-cn/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开

**基本使用**

[渲染图表](zh-cn/prepare) | [图表配置](zh-cn/charts_configure) | [图表详情](zh-cn/charts) | [数据解析与导入](zh-cn/data_import)
[渲染图表](zh-cn/prepare) | [图表配置](zh-cn/charts_configure) | [基本图表](zh-cn/charts_base) | [自定义图表](zh-cn/charts_custom) | [数据解析与导入](zh-cn/data_import)

**高级话题**

Expand Down
4 changes: 3 additions & 1 deletion docs/zh-cn/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开
- 基本使用
- [渲染图表](zh-cn/prepare)
- [图表配置](zh-cn/charts_configure)
- [图表详情](zh-cn/charts)
- [基本图表](zh-cn/charts_base)
- [自定义图表](zh-cn/charts_custom)
- [图表风格](zh-cn/charts_style)
- 高级话题
- [图表 API](zh-cn/api)
- [自定义主题](zh-cn/themes)
Expand Down
14 changes: 14 additions & 0 deletions docs/zh-cn/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,3 +286,17 @@ bar2 = Bar("Bar chart", "precipitation and evaporation one year")
bar2.add("precipitation", attr, v1, is_label_show=True, label_formatter=label_formatter)
bar2.render()
```

## 编辑 _option

如果 pyecharts 的自带 options 不能满足要求的话,开发人员是可以自己插入自己的配置选项。唯一的问题是,pyecharts 不能把某选项设置为空 (null)。
从 0.5.10 起,这个问题得到了解决。

```python
from pyecharts import NULL, Kline

kline = Kline("K 线图-默认示例")
kline.add("日K", DATE, data)
kline._option['series'][0]['itemStyle']['normal']['borderColor'] = NULL
kline.render()
```
27 changes: 22 additions & 5 deletions docs/zh-cn/changelog.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,36 @@
# 版本日志

* ### version 0.5.10
* Todo
* ### version 0.6.0(dev)
* TODO


* ### version 0.5.9 - 2018.8.26(current)

* ### version 0.5.10 - 2018.9.4(current)

#### Added
* [issue#699](https://github.com/pyecharts/pyecharts/issues/699) 为漏斗图新增 `funnel_sort``funnel_gap` 分别用于控制漏斗图的排序方式和数据图形间隔。
* [issue#703](https://github.com/pyecharts/pyecharts/issues/703) 支持设置 Echarts 某选项为空 (null)
* [issue#720](https://github.com/pyecharts/pyecharts/issues/720) 新增 3D 曲面图图形种类。

#### Fixed
* [issue#715](https://github.com/pyecharts/pyecharts/issues/715) 修复 online() 方法不生效的 bug

#### Updated
* [issue#702](https://github.com/pyecharts/pyecharts/issues/702) Toobox 选项标签文本更改为更通用的英语。

#### Removed
* 停止对 Python3.4 版本的支持和维护。


* ### version 0.5.9 - 2018.8.26

#### Added
* [pr#685](https://github.com/pyecharts/pyecharts/pull/685) 图表方法(`use_theme`/`config`/`add`)支持链式调用
* [pr#690](https://github.com/pyecharts/pyecharts/pull/690) Radar 新增 `set_radar_component` 方法,废弃 `config` 方法;Parallel 图新增 `set_schema` 方法,废弃 `confg` 方法
* [issue#687](https://github.com/pyecharts/pyecharts/issues/687) 新增 `add_coordinate_json` 方法用于支持导入 Geo/Geolines 坐标数据
* [issue#691](https://github.com/pyecharts/pyecharts/issues/691) 为每种图形新增 `is_animation` 初始化参数,用于控制是否显示动画。
* 新增 [geo-region-coords](https://github.com/pyecharts/geo-region-coords) 辅助项目,提供中国地区坐标查询。

### Updated
#### Updated
* [issue#678](https://github.com/pyecharts/pyecharts/issues/678)`extra_html_text_label` 默认位置移动到图形顶部。
* [pr#677](https://github.com/pyecharts/pyecharts/pull/677) 重构 Polar,更正错误参数。

Expand Down
Loading

0 comments on commit 3d94acf

Please sign in to comment.