|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import { LineChart } from 'react-chartkick' |
|
|
|
import { LineChart } from 'react-chartkick' |
|
|
|
import styles from '../../styles/styles.module.css'; |
|
|
|
import styles from '../../styles/styles.module.css'; |
|
|
|
import 'chart.js' |
|
|
|
import 'chart.js'; |
|
|
|
|
|
|
|
|
|
|
|
const defaultProps = { |
|
|
|
const defaultProps = { |
|
|
|
active: false, |
|
|
|
active: false, |
|
|
|
@ -49,17 +49,18 @@ export default function Chart({ data, title, color, unit, dataCollections }: Cha |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
return ( |
|
|
|
return ( |
|
|
|
<LineChart |
|
|
|
<div className={styles.lineChartContainer}> |
|
|
|
className={styles.lineChartContainer} |
|
|
|
<LineChart |
|
|
|
xtitle="Time" |
|
|
|
xtitle="Time" |
|
|
|
ytitle={title} |
|
|
|
ytitle={title} |
|
|
|
suffix={unit} |
|
|
|
suffix={unit} |
|
|
|
legend="bottom" |
|
|
|
legend="bottom" |
|
|
|
color={color} |
|
|
|
color={color} |
|
|
|
data={renderData} |
|
|
|
data={renderData} |
|
|
|
download={title} |
|
|
|
download={title} |
|
|
|
/> |
|
|
|
/> |
|
|
|
) |
|
|
|
</div> |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Chart.defaultProps = { |
|
|
|
Chart.defaultProps = { |
|
|
|
|