Skip to content

Instantly share code, notes, and snippets.

@krystalcampioni
Created June 20, 2022 16:36
Show Gist options
  • Save krystalcampioni/92c360e9f12f5c83b9ea09d64fa2f5f6 to your computer and use it in GitHub Desktop.
Save krystalcampioni/92c360e9f12f5c83b9ea09d64fa2f5f6 to your computer and use it in GitHub Desktop.
export interface DataPoint {
key: number | string;
value: number | null;
}
export interface DataSeries {
data: DataPoint[];
color?: Color;
isComparison?: boolean;
name: string;
}
export enum ChartState {
Loading = 'Loading',
Error = 'Error',
Success = 'Success',
}
export interface ChartProps {
data: DataSeries[];
theme?: string;
isAnimated?: boolean;
state?: ChartState;
}
export type WithRequired<T, K extends keyof T> = T & {[P in K]-?: T[P]};
// ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment