Skip to content

Commit d21410c

Browse files
authored
Examples use the source code from bundle instead of fetch (#354)
1 parent bfcdf07 commit d21410c

File tree

119 files changed

+728
-543
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+728
-543
lines changed

.eslintrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@
8383
"react/jsx-props-no-spreading": "off",
8484
"react/state-in-constructor": "off",
8585
"react/prop-types": "off",
86+
"import/no-unresolved": [
87+
"error",
88+
{
89+
"ignore": ["\\?raw$"]
90+
}
91+
],
8692
"react/static-property-placement": "off",
8793
"react/jsx-one-expression-per-line": "off"
8894
},

.prettierignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

package-lock.json

Lines changed: 0 additions & 87 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
"dependencies": {
5151
"@monaco-editor/react": "^4.7.0",
5252
"@stackblitz/sdk": "^1.11.0",
53-
"cross-fetch": "^3.2.0",
5453
"d3-scale": "^4.0.2",
5554
"d3-shape": "^2.0.0",
5655
"highlight.js": "^11.11.1",

src/components/Shared/StackBlitzLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export function StackBlitzLink({ code, title, children }: StackBlitzLinkProps) {
7070
files: {
7171
'public/index.html': indexHtmlCode,
7272
/*
73-
* This file has jsx in it, but create-react-app requires that the entry point is a src/index.js file.
73+
* This file has jsx in it, but create-react-app requires that the entry point is a src/index.ts file.
7474
*/
7575
'src/index.js': indexJsCode,
7676
'src/Example.jsx': code,

src/docs/api/Area.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ export default {
5555
},
5656
{
5757
name: 'legendType',
58-
type:
59-
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
58+
type: "'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
6059
defaultVal: "'line'",
6160
isOptional: true,
6261
desc: {

src/docs/api/Bar.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ export default {
4343
},
4444
{
4545
name: 'legendType',
46-
type:
47-
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
46+
type: "'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
4847
defaultVal: "'rect'",
4948
isOptional: true,
5049
desc: {

src/docs/api/CartesianGrid.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ export default {
7676
type: 'Function',
7777
isOptional: true,
7878
desc: {
79-
'en-US': 'A function that generates the y-coordinates of all horizontal lines. The generator gets passed an object of the shape { yAxis, width, height, offset }.',
79+
'en-US':
80+
'A function that generates the y-coordinates of all horizontal lines. The generator gets passed an object of the shape { yAxis, width, height, offset }.',
8081
'zh-CN': '生成所有水平线的 y 坐标的函数。生成器传递一个形状为 { yAxis, width, height, offset } 的对象。',
8182
},
8283
format: [
@@ -105,7 +106,8 @@ export default {
105106
type: 'Function',
106107
isOptional: true,
107108
desc: {
108-
'en-US': 'A function that generates the x-coordinates of all vertical lines. The generator gets passed an object of the shape { xAxis, width, height, offset }.',
109+
'en-US':
110+
'A function that generates the x-coordinates of all vertical lines. The generator gets passed an object of the shape { xAxis, width, height, offset }.',
109111
'zh-CN': '生成所有垂直线的 x 坐标的函数。生成器传递一个形状为 { xAxis, width, height, offset } 的对象',
110112
},
111113
format: [
@@ -140,9 +142,7 @@ export default {
140142
'en-US': 'The opacity of the background used to fill the space between grid lines',
141143
'zh-CN': '网格之间用于填充的背景的透明度',
142144
},
143-
format: [
144-
'<CartesianGrid strokeDasharray="3 3" fill="red" fillOpacity={0.6} />',
145-
],
145+
format: ['<CartesianGrid strokeDasharray="3 3" fill="red" fillOpacity={0.6} />'],
146146
},
147147
{
148148
name: 'strokeDasharray',

src/docs/api/ComposedChart.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
export default {
22
name: 'ComposedChart',
3-
desc:
4-
'A chart composed of line, area, and bar charts. When you just want to draw a chart of a single type like line, then LineChart is recommended.',
3+
desc: 'A chart composed of line, area, and bar charts. When you just want to draw a chart of a single type like line, then LineChart is recommended.',
54
props: [
65
{
76
name: 'layout',

src/docs/api/Funnel.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ export default {
3434
},
3535
{
3636
name: 'legendType',
37-
type:
38-
"'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
37+
type: "'line' | 'plainline' | 'square' | 'rect'| 'circle' | 'cross' | 'diamond' | 'square' | 'star' | 'triangle' | 'wye' | 'none'",
3938
defaultVal: "'line'",
4039
isOptional: true,
4140
desc: {

0 commit comments

Comments
 (0)