@@ -4,95 +4,83 @@ import AreaChart from './charts/AreaChart/AreaChart';
44import LineChart from './charts/LineChart/LineChart' ;
55import ScatterPlot from './charts/ScatterPlot/ScatterPlot' ;
66import PieChart from './charts/PieChart/PieChart' ;
7- import GlobalStyle from './styles/globals' ;
8- import { Container } from './styles/componentStyles' ;
9-
10- import skinny_fruit from '../data/skinny_fruit.json' ;
11-
12- //data taken from https://data.world/2918diy/coffee-chain
13- import coffee_shop from '../data/coffee_shop.json' ;
147
15- //data taken from https://fred.stlouisfed.org/
16- import ny_unemployment from '../data/ny_unemployment.json' ;
8+ import portfolio from '../data/portfolio.json' ;
9+ import penguins from '../data/penguins.json' ;
10+ import fruit from '../data/fruit.json' ;
1711
18- //data taken from https://ourworldindata.org/grapher/life-expectancy-vs-gdp-per-capita
19- import life_expectancy from '../data/life_expectancy.json' ;
20-
21- //data taken from https://www.ers.usda.gov/data-products/international-macroeconomic-data-set/
22- import historical_gdp from '../data/historical_gdp.json' ;
12+ import { Container } from './styles/componentStyles' ;
2313
2414function App ( ) {
2515 return (
2616 < Container className = "app" >
27- < GlobalStyle />
2817 < PieChart
29- data = { coffee_shop }
30- label = "product"
31- value = "sales"
32- outerRadius = { 300 }
33- innerRadius = { 200 }
34- pieLabel = { false }
35- legend = "right"
36- legendLabel = "Annual Sales 2021"
18+ theme = "dark"
19+ data = { fruit }
20+ label = "label"
21+ value = "value"
22+ legend = "top-left"
23+ outerRadius = { 240 }
24+ pieLabel = { true }
3725 />
38- < ScatterPlot
26+ < BarChart
27+ theme = "dark"
3928 height = "100%"
4029 width = "100%"
41- data = { life_expectancy }
42- xKey = "GDP per capita"
43- xDataType = "number"
44- xGrid = { true }
30+ data = { portfolio . slice ( 5 , 13 ) }
31+ xKey = "date"
32+ yKey = "value"
4533 xAxis = "bottom"
46- xAxisLabel = "GDP per capita"
47- yKey = "Life expectancy"
34+ yAxis = "right"
4835 yGrid = { true }
36+ xAxisLabel = "Date"
37+ yAxisLabel = "Value"
38+ legend = { 'bottom' }
39+ tooltipVisible = { true }
40+ />
41+ < AreaChart
42+ theme = "dark"
43+ height = "100%"
44+ width = "100%"
45+ data = { portfolio . slice ( 30 , 60 ) }
46+ xKey = "date"
47+ yKey = "value"
48+ xAxis = "bottom"
4949 yAxis = "right"
50- yAxisLabel = "Life Expectancy"
50+ yGrid = { true }
51+ xAxisLabel = "Date"
52+ yAxisLabel = "Value"
5153 />
5254 < LineChart
55+ theme = "dark"
5356 height = { '100%' }
5457 width = { '100%' }
55- data = { ny_unemployment }
56- groupBy = "county"
58+ data = { portfolio }
5759 xKey = "date"
5860 xDataType = "date"
59- yKey = "unemployment rate "
61+ yKey = "value "
6062 xAxis = "bottom"
6163 yAxis = "left"
6264 yGrid = { true }
6365 xAxisLabel = "Date"
64- yAxisLabel = "Unemployment Rate "
66+ yAxisLabel = "Value "
6567 legend = { 'right' }
66- legendLabel = "Counties "
68+ legendLabel = "Markets "
6769 />
68- < BarChart
70+ < ScatterPlot
71+ theme = "light"
6972 height = "100%"
7073 width = "100%"
71- data = { historical_gdp }
72- xKey = "year "
73- yKey = "GDP "
74- groupBy = "group"
74+ data = { penguins }
75+ xKey = "flipper_length_mm "
76+ xDataType = "number "
77+ xGrid = { true }
7578 xAxis = "bottom"
76- yAxis = "right"
79+ xAxisLabel = "Flipper Length"
80+ yKey = "body_mass_g"
7781 yGrid = { true }
78- xAxisLabel = "Date"
79- yAxisLabel = "Value"
80- legend = { 'bottom' }
81- />
82- < AreaChart
83- height = "100%"
84- width = "100%"
85- data = { skinny_fruit }
86- xKey = "date"
87- yKey = "value"
88- xAxis = "bottom"
89- groupBy = "fruit"
9082 yAxis = "right"
91- yGrid = { true }
92- xAxisLabel = "Date"
93- yAxisLabel = "Value"
94- legend = "bottom"
95- legendLabel = "Fruits"
83+ yAxisLabel = "Body Mass"
9684 />
9785 </ Container >
9886 ) ;
0 commit comments