forked from mui/toolpad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/master'
- Loading branch information
Showing
96 changed files
with
2,274 additions
and
1,253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,4 +14,5 @@ build | |
/test/integration/*/fixture*/ | ||
/test/visual/*/fixture*/ | ||
|
||
.generated | ||
.generated | ||
.github |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
docs/data/toolpad/core/components/line-chart/BasicLineChart.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react'; | ||
import { createDataProvider } from '@toolpad/core/DataProvider'; | ||
import { LineChart } from '@toolpad/core/LineChart'; | ||
import Box from '@mui/material/Box'; | ||
|
||
const myData = createDataProvider({ | ||
async getMany() { | ||
return { | ||
rows: [ | ||
{ id: 1, value: 19 }, | ||
{ id: 2, value: 34 }, | ||
{ id: 3, value: 6 }, | ||
{ id: 4, value: 14 }, | ||
{ id: 5, value: 17 }, | ||
], | ||
}; | ||
}, | ||
fields: { | ||
id: { label: 'ID' }, | ||
value: { label: 'Value', type: 'number' }, | ||
}, | ||
}); | ||
|
||
export default function BasicLineChart() { | ||
return ( | ||
<Box sx={{ width: '100%' }}> | ||
<LineChart height={250} dataProvider={myData} /> | ||
</Box> | ||
); | ||
} |
30 changes: 30 additions & 0 deletions
30
docs/data/toolpad/core/components/line-chart/BasicLineChart.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import * as React from 'react'; | ||
import { createDataProvider } from '@toolpad/core/DataProvider'; | ||
import { LineChart } from '@toolpad/core/LineChart'; | ||
import Box from '@mui/material/Box'; | ||
|
||
const myData = createDataProvider({ | ||
async getMany() { | ||
return { | ||
rows: [ | ||
{ id: 1, value: 19 }, | ||
{ id: 2, value: 34 }, | ||
{ id: 3, value: 6 }, | ||
{ id: 4, value: 14 }, | ||
{ id: 5, value: 17 }, | ||
], | ||
}; | ||
}, | ||
fields: { | ||
id: { label: 'ID' }, | ||
value: { label: 'Value', type: 'number' }, | ||
}, | ||
}); | ||
|
||
export default function BasicLineChart() { | ||
return ( | ||
<Box sx={{ width: '100%' }}> | ||
<LineChart height={250} dataProvider={myData} /> | ||
</Box> | ||
); | ||
} |
1 change: 1 addition & 0 deletions
1
docs/data/toolpad/core/components/line-chart/BasicLineChart.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<LineChart height={250} dataProvider={myData} /> |
42 changes: 42 additions & 0 deletions
42
docs/data/toolpad/core/components/line-chart/CustomizedLineChart.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as React from 'react'; | ||
import { createDataProvider } from '@toolpad/core/DataProvider'; | ||
import { LineChart } from '@toolpad/core/LineChart'; | ||
import Box from '@mui/material/Box'; | ||
|
||
const myData = createDataProvider({ | ||
async getMany() { | ||
return { | ||
rows: [ | ||
{ id: 1, value: 19 }, | ||
{ id: 2, value: 34 }, | ||
{ id: 3, value: 6 }, | ||
{ id: 4, value: 14 }, | ||
{ id: 5, value: 17 }, | ||
], | ||
}; | ||
}, | ||
fields: { | ||
id: { label: 'ID' }, | ||
value: { label: 'Value', type: 'number' }, | ||
}, | ||
}); | ||
|
||
export default function CustomizedLineChart() { | ||
return ( | ||
<Box sx={{ width: '100%' }}> | ||
<LineChart | ||
height={250} | ||
dataProvider={myData} | ||
series={[ | ||
{ | ||
dataKey: 'value', | ||
label: 'Custom Label', | ||
color: 'red', | ||
area: true, | ||
showMark: false, | ||
}, | ||
]} | ||
/> | ||
</Box> | ||
); | ||
} |
42 changes: 42 additions & 0 deletions
42
docs/data/toolpad/core/components/line-chart/CustomizedLineChart.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import * as React from 'react'; | ||
import { createDataProvider } from '@toolpad/core/DataProvider'; | ||
import { LineChart } from '@toolpad/core/LineChart'; | ||
import Box from '@mui/material/Box'; | ||
|
||
const myData = createDataProvider({ | ||
async getMany() { | ||
return { | ||
rows: [ | ||
{ id: 1, value: 19 }, | ||
{ id: 2, value: 34 }, | ||
{ id: 3, value: 6 }, | ||
{ id: 4, value: 14 }, | ||
{ id: 5, value: 17 }, | ||
], | ||
}; | ||
}, | ||
fields: { | ||
id: { label: 'ID' }, | ||
value: { label: 'Value', type: 'number' }, | ||
}, | ||
}); | ||
|
||
export default function CustomizedLineChart() { | ||
return ( | ||
<Box sx={{ width: '100%' }}> | ||
<LineChart | ||
height={250} | ||
dataProvider={myData} | ||
series={[ | ||
{ | ||
dataKey: 'value', | ||
label: 'Custom Label', | ||
color: 'red', | ||
area: true, | ||
showMark: false, | ||
}, | ||
]} | ||
/> | ||
</Box> | ||
); | ||
} |
13 changes: 13 additions & 0 deletions
13
docs/data/toolpad/core/components/line-chart/CustomizedLineChart.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<LineChart | ||
height={250} | ||
dataProvider={myData} | ||
series={[ | ||
{ | ||
dataKey: 'value', | ||
label: 'Custom Label', | ||
color: 'red', | ||
area: true, | ||
showMark: false, | ||
}, | ||
]} | ||
/> |
22 changes: 22 additions & 0 deletions
22
docs/data/toolpad/core/components/line-chart/ErrorLineChart.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as React from 'react'; | ||
import { createDataProvider } from '@toolpad/core/DataProvider'; | ||
import { LineChart } from '@toolpad/core/LineChart'; | ||
import Box from '@mui/material/Box'; | ||
|
||
const myData = createDataProvider({ | ||
async getMany() { | ||
throw new Error('Failed to fetch data'); | ||
}, | ||
fields: { | ||
id: { label: 'ID' }, | ||
value: { label: 'Value', type: 'number' }, | ||
}, | ||
}); | ||
|
||
export default function ErrorLineChart() { | ||
return ( | ||
<Box sx={{ width: '100%' }}> | ||
<LineChart height={150} dataProvider={myData} /> | ||
</Box> | ||
); | ||
} |
22 changes: 22 additions & 0 deletions
22
docs/data/toolpad/core/components/line-chart/ErrorLineChart.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import * as React from 'react'; | ||
import { createDataProvider } from '@toolpad/core/DataProvider'; | ||
import { LineChart } from '@toolpad/core/LineChart'; | ||
import Box from '@mui/material/Box'; | ||
|
||
const myData = createDataProvider({ | ||
async getMany() { | ||
throw new Error('Failed to fetch data'); | ||
}, | ||
fields: { | ||
id: { label: 'ID' }, | ||
value: { label: 'Value', type: 'number' }, | ||
}, | ||
}); | ||
|
||
export default function ErrorLineChart() { | ||
return ( | ||
<Box sx={{ width: '100%' }}> | ||
<LineChart height={150} dataProvider={myData} /> | ||
</Box> | ||
); | ||
} |
1 change: 1 addition & 0 deletions
1
docs/data/toolpad/core/components/line-chart/ErrorLineChart.tsx.preview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<LineChart height={150} dataProvider={myData} /> |
Oops, something went wrong.