Skip to content

Commit

Permalink
Merge pull request #3 from 647-coder/dev
Browse files Browse the repository at this point in the history
Add len
  • Loading branch information
647-coder authored Nov 17, 2017
2 parents 549cdb1 + 6e59eab commit 7755350
Show file tree
Hide file tree
Showing 46 changed files with 21,880 additions and 255 deletions.
31 changes: 22 additions & 9 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,21 @@

* ### version 0.2.6(Dev)

* TODO
#### Added
*[文档](https://github.com/chenjiandongx/pyecharts/blob/master/docs/zh-cn/documentation.md) 新增 [使用技巧](https://github.com/chenjiandongx/pyecharts/blob/master/docs/zh-cn/documentation.md#使用技巧) 介绍
* [issue#194](https://github.com/chenjiandongx/pyecharts/issues/194) 新增 `is_map_symbol_show` 参数,用于控制 Map 图 [红点的显示](https://www.oschina.net/question/1416804_245423)
* [issue#192](https://github.com/chenjiandongx/pyecharts/issues/192) 新增 `label_emphasis_pos`, `label_emphasis_textsize`, `label_emphasis_textcolor` 参数,用于解决 Geo 图 tooltip 不能只显示城市名和数值的问题
* [issue#132](https://github.com/chenjiandongx/pyecharts/issues/132) 新增图形类型树图
* [issue#181](https://github.com/chenjiandongx/pyecharts/issues/181) 为 Geo 图新增 `is_roam` 参数解决不能缩放和移动的问题
* [issue#199](https://github.com/chenjiandongx/pyecharts/issues/199) 为 markLine 新增 `mark_line_symbolsize``mark_line_valuedim` 参数,解决不能指定维度以及标记大小不能调整的问题
* [issue#200](https://github.com/chenjiandongx/pyecharts/issues/200) 为 xyAxis 通用配置项新增 `is_xaxis_show``is_yaxis_show` 参数,(控制是否显示 x 轴或 y 轴)解决设计可编辑文本的问题
* [issue#201](https://github.com/chenjiandongx/pyecharts/issues/201) 为 Bar 图新增 `bar_category_gap` 参数,提供绘制直方图的方案

#### Changed
* 将 label 通用配置项的 `is_emphasis` 参数更改为 `is_label_emphasis`

#### Fixed
* [issue#195](https://github.com/chenjiandongx/pyecharts/issues/195) 修复 HeatMap 图配置 x、y 轴属性无效的问题

* ### version 0.2.5 - 2017.9.28(Current)

Expand All @@ -16,7 +29,7 @@
* 部分解决 Overlap 和 Grid 不能一起使用的问题(当 Overlap 为多 x 轴或多 y 轴的时候坐标轴索引仍会出现问题)

* ### version 0.2.4 - 2017.9.8

#### Added
* [issue#148](https://github.com/chenjiandongx/pyecharts/issues/148) 为 Radar.config() 新增 `legend_text_size` 参数
* [issue#148](https://github.com/chenjiandongx/pyecharts/issues/148) 为 Legend 通用配置项新增 `legend_text_color``legend_text_font` 参数
Expand Down Expand Up @@ -92,7 +105,7 @@
* Graph 图中新增 `graph_edge_symbol`, `graph_edge_symbolsize` 参数
* [issue#94](https://github.com/chenjiandongx/pyecharts/issues/94) 提供 pyecharts-snapshot 用于将生成的图片保存为 png 或 pdf 文件,仅静态图片生效。(3D 图和动态图不生效)
* [issue#98](https://github.com/chenjiandongx/pyecharts/issues/98) 通用配置项中新增 tooltip 模块

#### Changed
* jupyter-notebook 和本地 render() 现在均采用动态加入 js 依赖文件的方法,生成文件体积大大缩小。
* 更改通用配置项中的 label 的参数 `formatter``label_formatter`
Expand All @@ -103,17 +116,17 @@
* ### version 0.1.9.5 - 2017.8.16

#### Added
* 为 xyAxis 模块新增下列参数
`xaxis_interval`, `xaxis_name_size`, `xaxis_name_gap`, `xaxis_margin`, `is_xaxislabel_align`
`yaxis_interval`, `yaxis_name_size`, `yaxis_name_gap`, `yaxis_margin`, `is_yaxislabel_align`
* 为 xyAxis 模块新增下列参数
`xaxis_interval`, `xaxis_name_size`, `xaxis_name_gap`, `xaxis_margin`, `is_xaxislabel_align`
`yaxis_interval`, `yaxis_name_size`, `yaxis_name_gap`, `yaxis_margin`, `is_yaxislabel_align`
* [issue#86](https://github.com/chenjiandongx/pyecharts/issues/86) 为 3D 图新增参数用于配置坐标轴选项(参见通用配置项中的 axis3D)
* 修改自定义模块的接口,现自定义模块有以下 4 个类,具体用法参见文档
* Grid 类:并行显示多张图
* Overlap 类:结合不同类型图表叠加画在同张图上
* Page 类:同一网页按顺序展示多图
* Timeline 类:提供时间线轮播多张图
* 新增 Timeline 功能,支持轮播多张图表

#### Changed
* jupyter notebook 现在也为离线模式,从本地加载项目所需 js 文件。至此 pyecharts 彻底实现本地化运行。速度更快,不再受网速影响。

Expand Down Expand Up @@ -160,7 +173,7 @@
* ### version 0.1.9.1 - 2017.7.31

#### Added
* 加入 Travis-CI 自动化测试。
* 加入 Travis-CI 自动化测试。
* [issue#46](https://github.com/chenjiandongx/pyecharts/issues/46) legend 增加 `legend_selectedmode` 参数,图例可以设置为单例或者多例。(参见 Radar 图)
* visualmap 组件增加 `visual_type``visual_range_size` 参数。现在支持映射到颜色和图形大小两种方式。(参见 Scatter 图)

Expand All @@ -180,7 +193,7 @@

#### Added
* [issue#05](https://github.com/chenjiandongx/pyecharts/issues/5) 新增在 Jupyter Notebook 中展示图表功能。感谢 [@ygw365](https://github.com/ygw365) 提供这部分的代码模板 和 [@muxuezi](https://github.com/muxuezi) 协助对代码进行改进!
* 新增对自定义地图的使用说明
* 新增对自定义地图的使用说明


* ### version 0.1.7 - 2017.7.26
Expand Down
29 changes: 25 additions & 4 deletions docs/en-us/doc_for_pyechart_developer.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Developer's Guide

## Pull request instructions

`dev` branch is for the development of each new releases. `master` branch is reserved for released code only. What it means for contributors is:
please checkout `dev` branch right after you have a clone of pyecharts. Then start your engineering effort. When you are ready, please submit a PR
against `dev` branch too.

If your PR has code changes, please include unit tests. If possible, please attach a screenshot on your contribution. It helps everyone to see your contribution.

## Why the folder `pyecharts/templates/js` is empty?

It is because your git did not update the submodule. Please issue the following command:
Expand All @@ -20,11 +28,11 @@ git submodule update
## How to add more javascript libraries to pyecharts

All javascript libraries are now managed in a [submodule](https://git-scm.com/docs/git-submodule) [jupyter-echarts](https://github.com/chfw/jupyter-echarts). It means
new javascript library shall go through jupyter-echarts.
new javascript library shall go through `jupyter-echarts`.

jupyter-echarts is a front-end project. If you are new to front-end engineering, please find the crash course for you in the end.

# Step 1: add the library to jupyter-echarts
### Step 1: add the library to jupyter-echarts

Checkout the repository:

Expand All @@ -46,6 +54,17 @@ FILES = [
'./node_modules/echarts/dist/echarts.min.js',
'./node_modules/echarts/map/js/china.js',
'./node_modules/your_library/dist/min_version.js' <---
...
FILE_MAP = [
...
'nick_name': 'min_version' // note, please do not put .js suffix
...
]
PROVINCE_PINYIN_MAP = [
...
'chinese location name': 'nick_name', // note nick_name is the same as previous one
...
]
```

Then run
Expand All @@ -57,8 +76,10 @@ $ gulp
The most important thing is to do git commit. You will need to commit it
to jupyter-echarts. If you do not have write access, please submit a PR.

If your contribution become large, please reference: echarts-countries-js or
echarts-china-cities-js.

# Step 2: update pyecharts
### Step 2: update pyecharts

Once your previous commit is accepted in jupyter-notebooks, you could then
checkout pyecharts::
Expand Down Expand Up @@ -86,7 +107,7 @@ $ git commit -am "pull latest changes from jupyter-echarts
And then push your changes to pyecharts.


## Front end engineering for backend Pythonistas
## Front end engineering for Pythonistas

In front end engineering field, no one manually downloads a javascript/css file
and type the script tag into html file. To an extreme, no one writes html, css
Expand Down
25 changes: 24 additions & 1 deletion docs/en-us/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ dataZoom:dataZoom components for zoom-in and zoom-out. With them, it is possib
It specifies whether to use the datazoom component.
* datazoom_type -> str
defalut -> 'slider'
datazoom type, 'slider' or 'inside'
datazoom type, 'slider', 'inside', or 'both'
* datazoom_range -> list
defalut -> [50, 100]
The range percentage of the window out of the data extent, in the range of 0 ~ 100.
Expand Down Expand Up @@ -1028,6 +1028,12 @@ add(name, x_axis, y_axis, data, **kwargs)
data of yAxis, it must be catagory axis.
* data -> [[],[]]
data array of series, it is represented by a two-dimension array
* is_date_heatmap -> bool
default -> False
Whether it is a date heatmap
* date_range -> str/list
date range of date heatmap, "2016" is year 2016, ["2016-5-5", "2017-5-5"] is 2016/5/5-2017/5/5

```python
import random
from pyecharts import HeatMap
Expand All @@ -1044,6 +1050,23 @@ heatmap.render()
```
![heatmap-0](https://github.com/chenjiandongx/pyecharts/blob/master/images/heatmap-0.gif)

```python
import datetime
import random
from pyecharts import HeatMap

begin = datetime.date(2017, 1, 1)
end = datetime.date(2017, 12, 31)
data = [[str(begin + datetime.timedelta(days=i)),
random.randint(0, 100)] for i in range((end - begin).days+1)]
heatmap = HeatMap("日历热力图示例")
heatmap.add("日历热力图", data, date_range=["2017"], is_visualmap=True,
is_legend_show=False, is_date_heatmap=True, visual_orient="horizontal",
visual_pos="center", visual_top="top")
heatmap.render()
```
![heatmap-0](https://github.com/chenjiandongx/pyecharts/blob/master/images/heatmap-1.gif)

**Tip:** Thermodynamic chart have to cooperate with VisualMap in use.


Expand Down
Loading

0 comments on commit 7755350

Please sign in to comment.