Skip to content

Commit d60c015

Browse files
committed
docs: add Traditional Chinese version link to README files
docs: add Traditional Chinese version link to README files
1 parent c70d4bd commit d60c015

File tree

4 files changed

+143
-3
lines changed

4 files changed

+143
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/wuba/react-native-echarts/pulls)
1010
[![license](https://img.shields.io/github/license/wuba/react-native-echarts.svg?style=flat)](https://github.com/wuba/react-native-echarts/blob/main/LICENSE)
1111

12-
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.md)
12+
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.md) | [繁體中文](./README_TW.md)
1313

1414
[React Native](https://reactnative.dev/) version of [Apache Echarts](https://github.com/apache/echarts), based on [react-native-svg](https://github.com/software-mansion/react-native-svg) and [react-native-skia](https://github.com/shopify/react-native-skia). This awesome library offers significantly improved performance compared to WebView-based solutions.
1515

README_CN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/wuba/react-native-echarts/pulls)
1010
[![license](https://img.shields.io/github/license/wuba/react-native-echarts.svg?style=flat)](https://github.com/wuba/react-native-echarts/blob/main/LICENSE)
1111

12-
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.md)
12+
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.md) | [繁體中文](./README_TW.md)
1313

1414
[React Native](https://reactnative.dev/) 版本的 [Apache Echarts](https://github.com/apache/echarts),基于 [react-native-svg](https://github.com/software-mansion/react-native-svg)[react-native-skia](https://github.com/shopify/react-native-skia)。相比基于 WebView 的解决方案提供了显著的性能提升。
1515

README_JP.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/wuba/react-native-echarts/pulls)
1010
[![license](https://img.shields.io/github/license/wuba/react-native-echarts.svg?style=flat)](https://github.com/wuba/react-native-echarts/blob/main/LICENSE)
1111

12-
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.md)
12+
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.md) | [繁體中文](./README_TW.md)
1313

1414
[React Native](https://reactnative.dev/) バージョンの [Apache Echarts](https://github.com/apache/echarts)[react-native-svg](https://github.com/software-mansion/react-native-svg)[react-native-skia](https://github.com/shopify/react-native-skia) に基づいています。WebViewベースのソリューションと比較して、顕著なパフォーマンス向上を提供します。
1515

README_TW.md

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
[![](./logo.svg)](https://wuba.github.io/react-native-echarts/)
2+
=
3+
4+
[![npm version](https://img.shields.io/npm/v/@wuba/react-native-echarts.svg?style=flat)](https://www.npmjs.com/package/@wuba/react-native-echarts)
5+
[![npm downloads](https://img.shields.io/npm/dm/@wuba/react-native-echarts)](https://www.npmjs.com/package/@wuba/react-native-echarts)
6+
[![codecov](https://codecov.io/gh/wuba/react-native-echarts/graph/badge.svg?token=BF6LGEXO55)](https://codecov.io/gh/wuba/react-native-echarts)
7+
[![issues](https://img.shields.io/github/issues/wuba/react-native-echarts.svg?style=flat)](https://github.com/wuba/react-native-echarts/issues)
8+
[![GitHub contributors](https://img.shields.io/github/contributors/wuba/react-native-echarts.svg?style=flat)](https://github.com/wuba/react-native-echarts/graphs/contributors)
9+
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/wuba/react-native-echarts/pulls)
10+
[![license](https://img.shields.io/github/license/wuba/react-native-echarts.svg?style=flat)](https://github.com/wuba/react-native-echarts/blob/main/LICENSE)
11+
12+
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.md) | [繁體中文](./README_TW.md)
13+
14+
[React Native](https://reactnative.dev/) 版本的 [Apache Echarts](https://github.com/apache/echarts),基於 [react-native-svg](https://github.com/software-mansion/react-native-svg)[react-native-skia](https://github.com/shopify/react-native-skia)。相比基於 WebView 的解決方案提供了顯著的性能提升。
15+
16+
可在[官網查看完整的文檔](https://wuba.github.io/react-native-echarts/zh-hant/)
17+
18+
## 關於
19+
20+
* 🔥 與 Apache ECharts 的使用方式相同
21+
* 🎨 豐富的圖表支持,涵蓋幾乎所有的使用場景
22+
* ✨ 可選的渲染庫:[Skia](https://github.com/shopify/react-native-skia)[SVG](https://github.com/software-mansion/react-native-svg)
23+
* 🚀 可與 Web 復用的代碼
24+
* 📱 支持點擊、拖拽、縮放等手勢
25+
26+
## 安裝
27+
28+
```sh
29+
yarn add @wuba/react-native-echarts echarts
30+
```
31+
32+
根據您的需要安裝 [react-native-svg](https://github.com/software-mansion/react-native-svg#installation)[react-native-skia](https://shopify.github.io/react-native-skia/docs/getting-started/installation/)
33+
34+
> 推薦使用最新版本的 echarts、react-native-svg 和 react-native-skia
35+
36+
## 用法
37+
38+
![example](https://raw.githubusercontent.com/wuba/react-native-echarts/main/screenshots/example.jpg)
39+
40+
大多數 ECharts 中的圖表都受支持,使用方法基本保持一致。關於更多使用案例和演示預覽,您可以下載 [Taro Playground](https://github.com/wuba/taro-playground) 應用程序。
41+
42+
### 示例
43+
```js
44+
// 選擇您喜歡的渲染器
45+
// import { SkiaChart, SVGRenderer } from '@wuba/react-native-echarts';
46+
import { SvgChart, SVGRenderer } from '@wuba/react-native-echarts';
47+
import * as echarts from 'echarts/core';
48+
import { useRef, useEffect } from 'react';
49+
import {
50+
BarChart,
51+
} from 'echarts/charts';
52+
import {
53+
TitleComponent,
54+
TooltipComponent,
55+
GridComponent,
56+
} from 'echarts/components';
57+
58+
// 註冊擴展組件
59+
echarts.use([
60+
TitleComponent,
61+
TooltipComponent,
62+
GridComponent,
63+
SVGRenderer,
64+
// ...
65+
BarChart,
66+
])
67+
68+
const E_HEIGHT = 250;
69+
const E_WIDTH = 300;
70+
71+
// 初始化
72+
function ChartComponent({ option }) {
73+
const chartRef = useRef<any>(null);
74+
75+
useEffect(() => {
76+
let chart: any;
77+
if (chartRef.current) {
78+
// @ts-ignore
79+
chart = echarts.init(chartRef.current, 'light', {
80+
renderer: 'svg',
81+
width: E_WIDTH,
82+
height: E_HEIGHT,
83+
});
84+
chart.setOption(option);
85+
}
86+
return () => chart?.dispose();
87+
}, [option]);
88+
89+
// 選擇你偏愛的圖表組件
90+
// return <SkiaChart ref={chartRef} />;
91+
return <SvgChart ref={chartRef} />;
92+
}
93+
94+
// 組件使用
95+
export default function App() {
96+
const option = {
97+
xAxis: {
98+
type: 'category',
99+
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
100+
},
101+
yAxis: {
102+
type: 'value',
103+
},
104+
series: [
105+
{
106+
data: [120, 200, 150, 80, 70, 110, 130],
107+
type: 'bar',
108+
},
109+
],
110+
}
111+
return <ChartComponent option={option} />
112+
}
113+
```
114+
115+
### 只使用 SvgChart 或 SkiaChart 中的一個
116+
```js
117+
import SvgChart, { SVGRenderer } from '@wuba/react-native-echarts/svgChart';
118+
```
119+
120+
```js
121+
import SkiaChart, { SkiaRenderer } from '@wuba/react-native-echarts/skiaChart';
122+
```
123+
124+
## 貢獻
125+
126+
請參閱 [貢獻指南](CONTRIBUTING.md) 以了解如何為倉庫做出貢獻以及開發工作流程。
127+
128+
## 貢獻者
129+
130+
這個項目的存在要感謝所有做出貢獻的人:
131+
132+
[![](https://opencollective.com/react-native-echarts/contributors.svg?width=890&showBtn=false)](https://github.com/wuba/react-native-echarts/graphs/contributors)
133+
134+
## 許可
135+
136+
Apache-2.0
137+
138+
---
139+
140+
使用 [create-react-native-library](https://github.com/callstack/react-native-builder-bob) 創建。

0 commit comments

Comments
 (0)