generated from Blazity/next-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d469e7
commit 91ed65b
Showing
14 changed files
with
383 additions
and
182 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
import { timeSeriesConfig } from "utils/data/config"; | ||
import React from "react"; | ||
|
||
export interface DataRecord { | ||
[key: string]: any; | ||
type DataType<T extends Record<string, any>> = Array<T>; | ||
export interface DimensionProps { | ||
xMax: number; | ||
yMax: number; | ||
xMin: number; | ||
yMin: number; | ||
} | ||
|
||
export type TimeseriesConfigKey = keyof typeof timeSeriesConfig; | ||
export type TimeseriesConfigEntry = typeof timeSeriesConfig[TimeseriesConfigKey]; | ||
export type TimeseriesConfigColumn = TimeseriesConfigEntry["columns"][number]; | ||
export type TimeseriesColumns = ('year' | 'median' | 'average'| 'q75'| 'q25') | ||
|
||
export interface LineChartProps { | ||
data: Record<TimeseriesColumns, number> | ||
dataKey: TimeseriesColumns | ||
timeseriesConfigKey: TimeseriesConfigKey; | ||
} | ||
|
||
export interface ResponsiveXYChartProps extends LineChartProps { | ||
parentWidth: number; | ||
parentHeight: number; | ||
export interface LineChartProps<T extends Record<string, any>> { | ||
data: DataType<T> | ||
parentRef: React.RefObject<HTMLDivElement> | ||
dataKey: keyof T | ||
yearKey: keyof T | ||
children?: React.ReactElement<DimensionProps> | React.ReactElement<DimensionProps>[]; | ||
// lowerBandKey: keyof T | ||
// upperBandKey: keyof T | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.