mirror of
https://gitlab.com/mbugroup/lti-web-client.git
synced 2026-05-22 06:15:47 +00:00
refactor(FE): Use chart_data for Uniformity and add week nav
This commit is contained in:
+19
-13
@@ -2,26 +2,32 @@ import { BaseMetadata } from '@/types/api/api-general';
|
||||
import { BaseApproval } from '@/types/api/approval/approval';
|
||||
|
||||
// ==================== CHART DATA TYPES ====================
|
||||
export type WeightDistributionData = {
|
||||
weight: number;
|
||||
count: number;
|
||||
export type WeightDistributionRange = {
|
||||
range: string;
|
||||
min_weight: number;
|
||||
max_weight: number;
|
||||
bird_count: number;
|
||||
is_ideal_range: boolean;
|
||||
};
|
||||
|
||||
export type IdealRange = {
|
||||
min_weight: number;
|
||||
max_weight: number;
|
||||
total_ideal_birds: number;
|
||||
};
|
||||
|
||||
export type StatisticsData = {
|
||||
mean: number;
|
||||
standardDeviation: number;
|
||||
min: number;
|
||||
max: number;
|
||||
min_weight: number;
|
||||
max_weight: number;
|
||||
average_weight: number;
|
||||
total_birds_measured: number;
|
||||
};
|
||||
|
||||
export type WeekBarChartData = {
|
||||
has_data: boolean;
|
||||
weight_distribution: WeightDistributionData[];
|
||||
ideal_range: {
|
||||
min: number;
|
||||
max: number;
|
||||
} | null;
|
||||
statistics: StatisticsData | null;
|
||||
weight_distribution: WeightDistributionRange[];
|
||||
ideal_range: IdealRange;
|
||||
statistics: StatisticsData;
|
||||
};
|
||||
|
||||
export type BarChart = {
|
||||
|
||||
Reference in New Issue
Block a user