Skip to content

Commit c70d4bd

Browse files
committed
docs: add Japanese version link to README files
1 parent ca8579c commit c70d4bd

File tree

7 files changed

+423
-313
lines changed

7 files changed

+423
-313
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)
12+
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.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)
12+
[简体中文](./README_CN.md) | [English](./README.md) | [日本語](./README_JP.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: 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)
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-Hans/)
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) を使用して作成されました。

example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
"@expo/webpack-config": "~19.0.1",
1313
"@shopify/react-native-skia": "1.5.0",
1414
"echarts": "^5.5.0",
15-
"expo": "~52.0.20",
15+
"expo": "~52.0.31",
1616
"react": "18.3.1",
1717
"react-dom": "18.3.1",
18-
"react-native": "0.76.5",
18+
"react-native": "0.76.7",
1919
"react-native-gesture-handler": "~2.20.2",
2020
"react-native-reanimated": "~3.16.1",
2121
"react-native-svg": "15.8.0",

0 commit comments

Comments
 (0)