This commit is contained in:
Pritimay Sarkar
2023-08-23 20:57:33 +05:30
parent 16b3f521d4
commit 47d348d791
8 changed files with 173 additions and 4 deletions

View File

@@ -0,0 +1,10 @@
.button {
background-color: #4CAF50; /* Green */
border: none;
color: white;
padding: 15px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 16px;
}

View File

@@ -0,0 +1,19 @@
import React, { useState } from 'react';
import './ExportData.css';
function ExportData({ url, show }) {
const [startDate, setStartDate] = useState("");
const [endDate, setEndDate] = useState("");
const fetchFile = (start_date, end_date) => {
window.location.href = "https://asia-south1-hpos-af3cc.cloudfunctions.net/consolidation?start_date=2023-08-20&end_date=2023-08-21"
}
return (
<div>
<div className='button' onClick={() => fetchFile(startDate, endDate)}>Download Excel</div>
</div>
);
}
export default ExportData;

View File

@@ -25,9 +25,9 @@ class TestAnalyticsGraph extends Component {
data.reverse();
var margin = { top: 60, right: 20, bottom: 30, left: 50 },
width = 520 - margin.left - margin.right,
height = 220 - margin.top - margin.bottom;
var margin = { top: 30, right: 20, bottom: 50, left: 15 },
width = 850 - margin.left - margin.right,
height = 180 - margin.top - margin.bottom;
var svg = d3.select("#tests-count-graph").append('svg')
.attr("width", width + margin.left + margin.right)