merge
This commit is contained in:
10
src/components/ExportData.css
Normal file
10
src/components/ExportData.css
Normal 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;
|
||||
}
|
||||
19
src/components/ExportData.js
Normal file
19
src/components/ExportData.js
Normal 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;
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user