All files / src/pages/flowsheet-page/economics/results-panel/charts constants.ts

100% Statements 10/10
100% Branches 0/0
100% Functions 0/0
100% Lines 10/10

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57    76x 76x 76x 76x 76x   76x                     76x             76x                             76x             76x                
import type { ChartConfig } from "@/ahuora-design-system/ui/chart";
 
export const CHART_CASH_FLOW_NPV = "cash_flow_npv";
export const CHART_CAPEX_BREAKDOWN = "capex_breakdown";
export const CHART_OPEX_BREAKDOWN = "opex_breakdown";
export const CHART_MANUAL_BASELINE_COMPARISON = "manual_baseline_comparison";
export const COMPARISON_CHART_EXCLUDED_CATEGORIES = new Set(["roi_percent"]);
 
export const cashFlowChartConfig = {
  annualNetCashFlow: {
    label: "Annual Net Cash Flow",
    color: "hsl(var(--chart-1))",
  },
  cumulativeDiscountedCashFlow: {
    label: "Cumulative Discounted Cash Flow",
    color: "hsl(var(--chart-2))",
  },
} satisfies ChartConfig;
 
export const breakdownChartConfig = {
  value: {
    label: "Amount",
    color: "hsl(var(--chart-3))",
  },
} satisfies ChartConfig;
 
export const comparisonChartConfig = {
  target: {
    label: "Target",
    color: "hsl(var(--chart-1))",
  },
  baseline: {
    label: "Baseline",
    color: "hsl(var(--chart-4))",
  },
  result: {
    label: "Result",
    color: "hsl(var(--chart-2))",
  },
} satisfies ChartConfig;
 
export const DEFAULT_COMPARISON_METRIC_KEYS = new Set([
  "capex",
  "annual_opex",
  "annual_savings",
  "npv",
  "simple_payback_years",
]);
export const COMPARISON_METRIC_FILTERS = [
  { value: "capex", label: "Total capital cost" },
  { value: "annual_opex", label: "Annual operating cost" },
  { value: "annual_savings", label: "Annual savings" },
  { value: "npv", label: "NPV" },
  { value: "simple_payback_years", label: "Payback period" },
  { value: "lcoh", label: "LCOH" },
] as const;