Skip to content

Commit

Permalink
Merge pull request pyecharts#673 from pyecharts/dev
Browse files Browse the repository at this point in the history
Dev -> Master -> Release V0.5.8
  • Loading branch information
chenjiandongx authored Aug 13, 2018
2 parents 44edeb7 + b4b75ae commit 808c776
Show file tree
Hide file tree
Showing 28 changed files with 2,392 additions and 600 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
<a href="https://badge.fury.io/py/pyecharts">
<img src="https://badge.fury.io/py/pyecharts.svg" alt="Package version">
</a>
<a href="https://github.com/pyecharts/pyecharts/pulls">
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="Contributions welcome">
</a>
<a href="https://opensource.org/licenses/MIT">
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="LICENSE">
<img src="https://img.shields.io/badge/License-MIT-green.svg" alt="License">
</a>
</p>

Expand Down Expand Up @@ -58,9 +61,9 @@ Please note: since version 0.3.2, **NO LONGER** pyecharts comes with any map fil

### Geo Data extensions (0.5.7+)

1. From geonames.org, [138,398 cities of the world with a population of at least 1000 inhabitants](https://github.com/echarts-maps/echarts-cities-js): [echarts-cities-pypkg](https://github.com/pyecharts/echarts-cities-pypkg)
From geonames.org, [138,398](https://github.com/echarts-maps/echarts-cities-js) cities of the world with a population of at least 1000 inhabitants: [echarts-cities-pypkg](https://github.com/pyecharts/echarts-cities-pypkg)

In order to install them, you can try one or all of them below:
Install data extensions:

```shell
$ pip install echarts-cities-pypkg
Expand Down
4 changes: 2 additions & 2 deletions docs/zh-cn/README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# pyecharts 文档

[![Build Status](https://travis-ci.org/pyecharts/pyecharts.svg?branch=master)](https://travis-ci.org/pyecharts/pyecharts) [![Build status](https://ci.appveyor.com/api/projects/status/81cbsfjpfryv1cl8?svg=true)](https://ci.appveyor.com/project/chenjiandongx/pyecharts) [![codecov](https://codecov.io/gh/pyecharts/pyecharts/branch/master/graph/badge.svg)](https://codecov.io/gh/pyecharts/pyecharts) [![PyPI version](https://badge.fury.io/py/pyecharts.svg)](https://badge.fury.io/py/pyecharts) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Build Status](https://travis-ci.org/pyecharts/pyecharts.svg?branch=master)](https://travis-ci.org/pyecharts/pyecharts) [![Build status](https://ci.appveyor.com/api/projects/status/81cbsfjpfryv1cl8?svg=true)](https://ci.appveyor.com/project/chenjiandongx/pyecharts) [![codecov](https://codecov.io/gh/pyecharts/pyecharts/branch/master/graph/badge.svg)](https://codecov.io/gh/pyecharts/pyecharts) [![PyPI version](https://badge.fury.io/py/pyecharts.svg)](https://badge.fury.io/py/pyecharts) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/pyecharts/pyecharts/pulls) [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)


pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开源的一个数据可视化 JS 库。用 Echarts 生成的图可视化效果非常棒,pyecharts 是为了与 Python 进行对接,方便在 Python 中直接使用数据生成图。

**基本使用**

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

**高级话题**

Expand Down
3 changes: 2 additions & 1 deletion docs/zh-cn/_sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ pyecharts 是一个用于生成 Echarts 图表的类库。Echarts 是百度开

- 基本使用
- [渲染图表](zh-cn/prepare)
- [图表配置](zh-cn/charts)
- [图表配置](zh-cn/charts_configure)
- [图表详情](zh-cn/charts)
- 高级话题
- [图表 API](zh-cn/api)
- [自定义主题](zh-cn/themes)
Expand Down
41 changes: 41 additions & 0 deletions docs/zh-cn/advanced.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,47 @@ def test_geo_shantou_city():

![](https://user-images.githubusercontent.com/19553554/39248244-1be6da4a-48ce-11e8-931f-059879c5dcf4.png)

### Label 示例

使用回调函数强制设置浮点数位数

```python
from pyecharts_javascripthon.dom import window
from pyecharts import Bar, Grid


def custom_formatter(params):
return window.parseFloat(params.value).toFixed(2)


attr = ["aa", "bb", "Diabetes Mellitus Requiring Medication", "d", "e", "fff"]
v1 = [5.12, 20.85, 36.69, 10.10, 75.20, 90.36]
v2 = [10.00, 25.45, 8.23, 60.00, 20.50, 80.00]
bar = Bar("x 轴和 y 轴交换")
bar.add(
"商家A",
attr,
v1,
is_label_show=True,
label_pos="right",
label_formatter=custom_formatter,
)
bar.add(
"商家B",
attr,
v2,
is_convert=True,
is_label_show=True,
label_pos="right",
label_formatter=custom_formatter,
)
grid = Grid()
grid.add(bar, grid_left="40%")
grid.render()
```
![(https://user-images.githubusercontent.com/19553554/44003191-5c5e7764-9e81-11e8-98f1-757a208ec337.png)


## 使用 JavaScript 事件处理函数

Echarts 本身提供了 [api/events](http://echarts.baidu.com/api.html#events) 事件处理函数,主要通过 on 方式实现。
Expand Down
17 changes: 13 additions & 4 deletions docs/zh-cn/changelog.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
# 版本日志

* ### version 0.5.8(dev)
* ### version 0.5.9(dev)
* TODO

* ### version 0.5.7 - 2018.8.11(current)

* ### version 0.5.8 - 2018.8.13(current)

#### Added
* [issue#655](https://github.com/pyecharts/pyecharts/issues/655) 新增多个自定义主题:westeros, wonderland, chalk, halloween, essos,walden, romantic and purple-passion
* [issue#669](https://github.com/pyecharts/pyecharts/issues/669) 新增 Tree 图形种类。
* Polar 图新增 `angleaxis_label_interval` 参数,用于控制坐标轴刻度标签的显示间隔,在类目轴中有效。


* ### version 0.5.7 - 2018.8.11

#### Added
* [issue#651](https://github.com/pyecharts/pyecharts/issues/651) Scatter 图新增 `extra_name` 参数,额外的数据项的名称,可以为每个数据点指定一个名称。
* [issue#657](https://github.com/pyecharts/pyecharts/issues/657) 基本图形新增 `extra_html_text_label` 参数用于显示额外的文本标签,仅限于在单图形或者 Page 时使用。
* [issue#660](https://github.com/pyecharts/pyecharts/issues/660) 为 X/Y 坐标轴新增 `xaxis_line_color`, `xaxis_line_width`, `yaxis_line_color`, `yaxis_line_width` 四个参数,用于控制其坐标轴线线的颜色以及宽度。
* [pr#663](https://github.com/pyecharts/pyecharts/pull/663) 新增 echarts-cities-pypkg 为可选的地理数据扩展。引入来自 [geonames.org](http://geonames.org/) 的 138,398 个城市坐标。
* [pr#663](https://github.com/pyecharts/pyecharts/pull/663) 新增 `coordinate_region` 参数用于指定国家/地区检索坐标且提供了 echarts-cities-pypkg 为可选的地理数据扩展。引入来自 [geonames.org](http://geonames.org/) 的 138,398 个城市坐标。


* ### version 0.5.6 - 2018.7.28(current)
* ### version 0.5.6 - 2018.7.28

#### Fixed
* [issue#452](https://github.com/pyecharts/pyecharts/issues/452) 修复 K 线图不能显示 tooltip【open, close, lowest, highest】的 bug
Expand Down
Loading

0 comments on commit 808c776

Please sign in to comment.