csv data analysis for single file and pie chart

This commit is contained in:
prisar
2023-07-26 17:52:50 +05:30
parent 438f5b4a9e
commit 170c493870
7 changed files with 244 additions and 114 deletions

View File

@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import * as d3 from 'd3';
import moment from 'moment';
import './DeviceGraph.css';
import './TestAnalyticsGraph.css';
class TestAnalyticsGraph extends Component {
constructor(props) {
@@ -28,7 +28,7 @@ class TestAnalyticsGraph extends Component {
.x(function (d) { return x(moment(d.date)); })
.y(function (d) { return y(d.count); });
var svg = d3.select("#result-graph").append("svg")
var svg = d3.select("#tests-count-graph").append("svg")
.attr("width", width + margin.left + margin.right)
.attr("height", height + margin.top + margin.bottom)
.append("g").attr("transform",
@@ -84,8 +84,8 @@ class TestAnalyticsGraph extends Component {
render() {
return (
<div>
<div className='graph-card'>
<div id="result-graph" style={{ margin: '1em' }}>
<div className='tests-count-card'>
<div id="tests-count-graph" style={{ margin: '1em' }}>
</div>
<div className='graph-title'>test counts per day</div>
</div>