diff --git a/src/App.js b/src/App.js
index 5e344b0..471ca24 100644
--- a/src/App.js
+++ b/src/App.js
@@ -7,7 +7,7 @@ import 'react-tabs/style/react-tabs.css';
import isoCodes from './isoCodes.json';
import './App.css';
import Table from './Table';
-import Viz from './Viz';
+import Viz from './viz';
moment.locale('FI');
const headers = (showInfectionInfo) => [
diff --git a/src/Viz.js b/src/viz/Line.js
similarity index 54%
rename from src/Viz.js
rename to src/viz/Line.js
index aac3fe1..ad405c5 100644
--- a/src/Viz.js
+++ b/src/viz/Line.js
@@ -1,18 +1,18 @@
import React from 'react';
-import { XYPlot, XAxis, YAxis, VerticalGridLines, HorizontalGridLines, LineSeries } from 'react-vis';
-import '../node_modules/react-vis/dist/style.css';
+import { HorizontalGridLines, LineSeries, makeVisFlexible, VerticalGridLines, XAxis, XYPlot, YAxis } from 'react-vis';
import moment from 'moment';
import groupBy from 'lodash/groupBy';
import orderBy from 'lodash/orderBy';
-import {isMobile} from 'react-device-detect';
+
const formattedDate = (it) => moment(it.date).format('MM/DD/YYYY'); // Murica
-const mmdd = (it) => moment(it).format('DD-MM'); // Murica
+const mmdd = (it) => moment(it).format('DD-MM');
+
+const FlexXYPlot = makeVisFlexible(XYPlot);
-const Chart = ({ data }) => {
- const orderedData = orderBy(data, it => moment(it.date).format('YYYYMMDD'), ['asc']);
- const dataArr = Object.entries(
- groupBy(orderedData, it => formattedDate(it)))
+const Line = ({ data }) => {
+ const orderedbyDateData = orderBy(data, it => moment(it.date).format('YYYYMMDD'), ['asc']);
+ const dataArr = Object.entries(groupBy(orderedbyDateData, it => formattedDate(it)))
.reduce((acc, [date, data]) => {
acc.push({
x: new Date(date),
@@ -20,15 +20,10 @@ const Chart = ({ data }) => {
});
return acc;
}, []);
-
-
-
- console.log(dataArr)
return (
-