This commit is contained in:
Gabe Kangas
2020-10-29 18:01:38 -07:00
parent 6a1db77c53
commit 1f4169c45a
8 changed files with 178 additions and 8 deletions

View File

@@ -9,13 +9,14 @@ interface ToolTipProps {
const defaultProps = {
active: false,
payload: {},
unit: ""
};
interface ChartProps {
data: number,
data: [{}],
color: string,
unit: string,
dataCollections?: [],
dataCollections?: {},
}
function CustomizedTooltip(props: ToolTipProps) {
@@ -40,7 +41,7 @@ export default function Chart({ data, color, unit, dataCollections }: ChartProps
};
if (dataCollections) {
var ticks = dataCollections[0]?.data.map(function (collection) {
var ticks = dataCollections?[0].data.map(function (collection) {
return collection?.time;
})
} else {