forked from antvis/G2
-
Notifications
You must be signed in to change notification settings - Fork 1
/
gatsby-config.js
336 lines (335 loc) · 6.88 KB
/
gatsby-config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
const { repository, version } = require('./package.json');
module.exports = {
plugins: [
{
resolve: '@antv/gatsby-theme-antv',
options: {
// eslint-disable-next-line quotes
GATrackingId: `UA-148148901-5`,
},
},
],
// Customize your site metadata:
siteMetadata: {
title: 'G2',
description: 'The Grammar of Graphics in JavaScript',
siteUrl: 'https://g2-v4.antv.vision',
githubUrl: repository.url,
versions: {
'5.x': 'https://g2.antv.antgroup.com',
[version]: 'https://g2-v4.antv.vision',
'3.x': 'https://g2-v3.antv.vision/',
'2.x': 'https://antv.vision/old-site/g2/doc/index.html',
},
showChartResize: true, // 是否在demo页展示图表视图切换
showAPIDoc: true, // 是否在demo页展示API文档
themeSwitcher: 'g2',
navs: [
{
slug: 'docs/manual',
title: {
zh: '教程',
en: 'Manual',
},
order: 2,
},
{
slug: 'docs/api',
title: {
zh: 'API',
en: 'API',
},
order: 1,
},
{
slug: 'examples',
title: {
zh: '图表示例',
en: 'Examples',
},
order: 0,
},
],
ecosystems: [
{
name: {
zh: 'G2Plot(开箱即用的图表库)',
en: 'G2Plot (A charting library)',
},
url: 'https://g2plot.antv.vision',
},
{
name: {
zh: 'AntV ThemeSet(主题构建器)',
en: 'AntV ThemeSet',
},
url: 'https://theme-set.antv.vision',
},
],
docs: [
{
slug: 'manual/concepts',
title: {
zh: '可视化基础概念',
en: 'Visualization Concepts',
},
order: 2,
},
{
slug: 'manual/tutorial',
title: {
zh: '教程和文章',
en: 'Tutorials',
},
order: 3,
},
{
slug: 'manual/dataset',
title: {
zh: 'DataSet',
en: 'DataSet',
},
order: 4,
},
{
slug: 'manual/concepts/component',
title: {
zh: '图形组件',
en: 'Components',
},
order: 1,
},
{
slug: 'manual/concepts/geometry',
title: {
zh: '几何图形',
en: 'Geometry',
},
order: 2,
},
{
slug: 'api/general',
title: {
zh: 'G2 详细手册',
en: 'G2 General Documentation',
},
order: 0,
},
{
slug: 'api/advanced',
title: {
zh: '高级进阶功能',
en: 'Advanced Chart Features',
},
order: 1,
},
{
slug: 'api/shape',
title: {
zh: '绘图属性速查',
en: 'Quick Reference for Plotting Properties',
},
order: 2,
},
],
examples: [
{
slug: 'gallery',
icon: 'gallery',
title: {
zh: '',
en: '',
},
},
{
slug: 'case',
icon: 'gallery',
title: {
zh: '场景案例',
en: 'Show Case',
},
},
{
slug: 'interaction',
icon: 'interaction',
title: {
zh: '交互语法',
en: 'Grammar of Interaction',
},
},
{
slug: 'line',
icon: 'line',
title: {
zh: '折线图',
en: 'Line Chart',
},
},
{
slug: 'area',
icon: 'area',
title: {
zh: '面积图',
en: 'Area Chart',
},
},
{
slug: 'column',
icon: 'column',
title: {
zh: '柱状图',
en: 'Column Chart',
},
},
{
slug: 'bar',
icon: 'bar',
title: {
zh: '条形图',
en: 'Bar Chart',
},
},
{
slug: 'pie',
icon: 'pie',
title: {
zh: '饼图',
en: 'Pie Chart',
},
},
{
slug: 'point',
icon: 'point',
title: {
zh: '点图',
en: 'Point Chart',
},
},
{
slug: 'radar',
icon: 'radar',
title: {
zh: '雷达图',
en: 'Radar Chart',
},
},
{
slug: 'funnel',
icon: 'funnel',
title: {
zh: '漏斗图',
en: 'Funnel Chart',
},
},
{
slug: 'heatmap',
icon: 'heatmap',
title: {
zh: '热力图',
en: 'Heatmap',
},
},
{
slug: 'box',
icon: 'box',
title: {
zh: '箱型图',
en: 'Box Chart',
},
},
{
slug: 'candlestick',
icon: 'candlestick',
title: {
zh: '烛形图',
en: 'Candlestick Chart',
},
},
{
slug: 'gauge',
icon: 'gauge',
title: {
zh: '仪表盘',
en: 'Gauges',
},
},
{
slug: 'map',
icon: 'map',
title: {
zh: '地图',
en: 'Maps',
},
},
{
slug: 'facet',
icon: 'facet',
title: {
zh: '分面',
en: 'Facets',
},
},
{
slug: 'relation',
icon: 'relation',
title: {
zh: '关系图',
en: 'Relation Chart',
},
},
{
slug: 'component',
icon: 'component',
title: {
zh: '组件使用',
en: 'Chart Components',
},
},
{
slug: 'other',
icon: 'other',
title: {
zh: '其他图表',
en: 'Other Chart',
},
},
{
slug: 'customize',
icon: 'other',
title: {
zh: '业务自定义',
en: 'Customize',
},
},
],
docsearchOptions: {
apiKey: '200ec461f4aa0bb4f0e761566f1a1336',
indexName: 'antv_g2',
},
playground: {
devDependencies: {
typescript: 'latest',
},
htmlCodeTemplate: `<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>{{title}}</title>
</head>
<body>
<div id="container" />
<script src="https://gw.alipayobjects.com/os/lib/antv/g2/${version}/dist/g2.min.js"></script>
<script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.data-set-0.11.1/dist/data-set.js"></script>
<script>
<!-- 浏览器引入,请使用全局命名空间 G2,如 new Chart() 改为 new G2.Chart,即可运行。 -->
{{code}}
</script>
</body>
</html>`,
},
announcement: {
zh: '',
en: '',
},
},
};