diff --git a/src/components/HomePage/HomeGraphs/LineGraph.js b/src/components/HomePage/HomeGraphs/LineGraph.js index 3e57b56..6d93c1f 100644 --- a/src/components/HomePage/HomeGraphs/LineGraph.js +++ b/src/components/HomePage/HomeGraphs/LineGraph.js @@ -132,6 +132,7 @@ export default function Line() { if (graph === 'totalTime' && selection === 'subject') { + setInput([]); const subjectTeam = {}; timeAndLangFiltered.forEach(problem => { const sub = problem.topics; @@ -163,7 +164,10 @@ if (graph === 'totalTime' && selection === 'subject') { //temp['stack']='Total'; temp['data'] = []; for (let value in updateFormate[key]) { - temp['data'].push([value, updateFormate[key][value]]); + var data=[]; + data.push(value); + data.push(updateFormate[key][value]); + temp['data'].push(data); } finalResult.push(temp); } @@ -198,7 +202,7 @@ if (graph === 'totalTime' && selection === 'difficulty') { updateFormate[key]=temp; } - const finalResult = []; + const finalResultD = []; for (let key in updateFormate) { const temp = {}; temp['name'] = key; @@ -206,16 +210,20 @@ if (graph === 'totalTime' && selection === 'difficulty') { //temp['stack']='Total'; temp['data'] = []; for (let value in updateFormate[key]) { - temp['data'].push(value, updateFormate[key][value]); + var data=[]; + data.push(value); + data.push(updateFormate[key][value]); + temp['data'].push(data); } - finalResult.push(temp); + finalResultD.push(temp); } const containerD = []; - for (let i=0; i diff --git a/src/components/HomePage/index.js b/src/components/HomePage/index.js index db10fc9..8d8b487 100644 --- a/src/components/HomePage/index.js +++ b/src/components/HomePage/index.js @@ -18,7 +18,11 @@ export default function HomePage() {
{/*
*/} @@ -27,10 +31,8 @@ export default function HomePage() {
- -
- {" "} -