add info tooltip on analytics graph card

- add assets and config folders
	- rename conflicting css classess
This commit is contained in:
Pritimay Sarkar
2023-08-01 08:44:56 +05:30
parent 3932f197e0
commit 4396bd2d72
10 changed files with 143 additions and 64 deletions

View File

@@ -2,13 +2,18 @@ import React, { Component } from 'react';
import * as d3 from 'd3';
import moment from 'moment';
import { sgg } from 'ml-savitzky-golay-generalized';
import { FaBeer, FaInfoCircle } from "react-icons/fa";
import './TestAnalyticsGraph.css';
class TestAnalyticsGraph extends Component {
constructor(props) {
super(props);
this.state = { data: this.props.data, show: this.props.show };
this.state = {
data: this.props.data,
show: this.props.show,
showCardInfo: false
};
}
componentDidMount() {
// this.drawChart(this.state.data);
@@ -194,9 +199,10 @@ class TestAnalyticsGraph extends Component {
return (
<div>
<div className='tests-count-card'>
<div className='testcount-graph-title'>Daily test counts<span className='testcount-info-icon' onClick={() => !this.setState({ showCardInfo: !this.state.showCardInfo })}><FaInfoCircle /></span></div>
{this.state.showCardInfo && <div className='testcount-info-card'>Daily test counts are shown. While off days are not taken into consideration</div>}
<div id="tests-count-graph" style={{ margin: '1em' }}>
</div>
<div className='graph-title'>test counts per day</div>
</div>
</div>
)