Skip to content

Instantly share code, notes, and snippets.

@chancesmith
Created July 23, 2021 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chancesmith/670b5b3b884b59a995a1e136e2eac1fb to your computer and use it in GitHub Desktop.
Save chancesmith/670b5b3b884b59a995a1e136e2eac1fb to your computer and use it in GitHub Desktop.
chart types
type StatType = {}
type BarType = {
label: string;
value: number;
};
type DetailType = {
key: string;
value: number;
};
type BarChartReport = {
reportType: 'BARCHART';
title: string;
bars: BarType[];
topOfRange: number;
}
type StatReport = {
reportType: 'STAT';
title: string;
stat: number;
timeFrame: string;
details: DetailType[];
}
type DashboardReports = (BarChartReport|StatReport)[]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment