Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
holtzy committed Aug 8, 2024
1 parent 8c746f4 commit 9a569f6
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 0 deletions.
12 changes: 12 additions & 0 deletions viz/exercise/SvgPathFirstAreaChartPractice/Graph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export const Graph = () => {
return (
<svg width={500} height={300} style={{ overflow: 'visible' }}>
<path
d="M0 300 L0 40 L50 70 L100 150 L150 150 L200 200 L250 50 L300 90 L300 300 Z"
fill="#69b3a2"
stroke="#69b3a2"
fillOpacity={0.3}
/>
</svg>
);
};
6 changes: 6 additions & 0 deletions viz/exercise/SvgPathFirstAreaChartPractice/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// File used to render something in codesandbox only
import ReactDOM from 'react-dom';
import { Graph } from './Graph';

const rootElement = document.getElementById('root');
ReactDOM.render(<Graph />, rootElement);
28 changes: 28 additions & 0 deletions viz/exercise/SvgPathFirstAreaChartPractice/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "pie-chart-basic",
"version": "1.0.0",
"description": "",
"keywords": [],
"main": "index.js",
"dependencies": {
"react": "17.0.2",
"react-dom": "17.0.2",
"react-scripts": "4.0.0"
},
"devDependencies": {
"@babel/runtime": "7.13.8",
"typescript": "4.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}
11 changes: 11 additions & 0 deletions viz/exercise/SvgPathFirstAreaChartSolution/Graph.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export const Graph = () => {
return (
<svg width={500} height={300} style={{ overflow: 'visible' }}>
<path
d="M0 40 L50 70 L100 150 L150 150 L200 200 L250 50 L300 90"
fill="none"
stroke="#69b3a2"
/>
</svg>
);
};
6 changes: 6 additions & 0 deletions viz/exercise/SvgPathFirstAreaChartSolution/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// File used to render something in codesandbox only
import ReactDOM from 'react-dom';
import { Graph } from './Graph';

const rootElement = document.getElementById('root');
ReactDOM.render(<Graph />, rootElement);
28 changes: 28 additions & 0 deletions viz/exercise/SvgPathFirstAreaChartSolution/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "pie-chart-basic",
"version": "1.0.0",
"description": "",
"keywords": [],
"main": "index.js",
"dependencies": {
"react": "17.0.2",
"react-dom": "17.0.2",
"react-scripts": "4.0.0"
},
"devDependencies": {
"@babel/runtime": "7.13.8",
"typescript": "4.1.3"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jsdom",
"eject": "react-scripts eject"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
]
}

0 comments on commit 9a569f6

Please sign in to comment.