Activity() → {JSX.Element}
Component that displays a chart showing daily activity.
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dataActivity | Object | The props passed to the component. Properties
|
- See
- https://recharts.org/en-US/api/BarChart for further information on `BarChart` element from recharts api
A JSX element containing a BarChart
element from the recharts
library.
- Type:
- JSX.
Element
const dataActivity = {isLoading: false, data[{day:1, kilogram: 80, calories:240},...]}
return (
<Activity dataActivity={userActivity} />
)
Methods
(inner) LegendCustom() → {JSX.Element}
Displays a custom legend for a chart.
A JSX element representing the custom legend.
- Type:
- JSX.
Element
return{
<LegendCustom />
}
(inner) SpecialTooltip() → {null|JSX.Element}
Displays a custom tooltip for a chart.
Name | Type | Description |
---|---|---|
active | boolean | Whether or not the tooltip is active. |
payload | Array | An array of objects containing data for the chart. |
A JSX element representing the custom tooltip. If the active
property is true
and the payload
array exists and is not empty, the element is a list element containing the text returned by the TooltipText
function.
- Type:
- null |
JSX. Element
return{
<SpecialTooltip />
}