-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[code-infra] Add Charts sandbox generation (#15830)
- Loading branch information
Showing
7 changed files
with
102 additions
and
1 deletion.
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"dependencies": { | ||
"@emotion/react": "latest", | ||
"@emotion/styled": "latest", | ||
"@mui/icons-material": "latest", | ||
"@mui/material": "latest", | ||
"@mui/x-charts": "latest", | ||
"@mui/x-charts-pro": "latest", | ||
"@types/react": "latest", | ||
"@types/react-dom": "latest", | ||
"react": "latest", | ||
"react-dom": "latest", | ||
"typescript": "latest" | ||
}, | ||
"devDependencies": { | ||
"react-scripts": "latest" | ||
}, | ||
"main": "src/index.tsx", | ||
"scripts": { | ||
"start": "react-scripts start", | ||
"build": "react-scripts build", | ||
"test": "react-scripts test", | ||
"eject": "react-scripts eject" | ||
} | ||
} |
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,19 @@ | ||
<!doctype html> | ||
<html lang="en"> | ||
<head> | ||
<title>Charts — MUI X</title> | ||
<!-- Fonts to support Material Design --> | ||
<link rel="preconnect" href="https://fonts.googleapis.com" /> | ||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin /> | ||
<link | ||
rel="stylesheet" | ||
href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap" | ||
/> | ||
<meta name="viewport" content="initial-scale=1, width=device-width" /> | ||
<!-- Icons to support Material Design --> | ||
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" /> | ||
</head> | ||
<body> | ||
<div id="root"></div> | ||
</body> | ||
</html> |
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,20 @@ | ||
import * as React from 'react'; | ||
import Box from '@mui/material/Box'; | ||
import { BarChart } from '@mui/x-charts'; | ||
|
||
export default function Demo() { | ||
return ( | ||
<Box sx={{ height: 520, width: '100%' }}> | ||
<BarChart | ||
xAxis={[{ scaleType: 'band', data: ['group A', 'group B', 'group C'] }]} | ||
series={[ | ||
{ label: 'first', data: [4, 3, 5] }, | ||
{ label: 'second', data: [1, 6, 3] }, | ||
{ label: 'third', data: [2, 5, 6] }, | ||
]} | ||
width={500} | ||
height={300} | ||
/> | ||
</Box> | ||
); | ||
} |
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,12 @@ | ||
import * as React from 'react'; | ||
import * as ReactDOM from 'react-dom/client'; | ||
import { StyledEngineProvider } from '@mui/material/styles'; | ||
import Demo from './demo'; | ||
|
||
ReactDOM.createRoot(document.querySelector('#root')!).render( | ||
<React.StrictMode> | ||
<StyledEngineProvider injectFirst> | ||
<Demo /> | ||
</StyledEngineProvider> | ||
</React.StrictMode>, | ||
); |
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,6 @@ | ||
{ | ||
"title": "MUI X Charts template", | ||
"description": "Base template for reporting a bug", | ||
"tags": ["react", "typescript"], | ||
"published": true | ||
} |
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,19 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es5", | ||
"lib": ["dom", "dom.iterable", "esnext"], | ||
"allowJs": true, | ||
"skipLibCheck": true, | ||
"esModuleInterop": true, | ||
"allowSyntheticDefaultImports": true, | ||
"strict": true, | ||
"forceConsistentCasingInFileNames": true, | ||
"module": "esnext", | ||
"moduleResolution": "node", | ||
"resolveJsonModule": true, | ||
"isolatedModules": true, | ||
"noEmit": true, | ||
"jsx": "react" | ||
}, | ||
"include": ["src"] | ||
} |