feat: onglet Marchés + TvMiniChart sans popup + cache RP 48h + OIS default

- page.tsx: onglet '🌍 Marchés' — S&P 500, VIX, DXY, Or (TvMiniChart 2x2)
- TvChart: prop dateRange configurable sur TvMiniChart (défaut 1M)
- ReportTab: TvAdvancedChart → TvMiniChart (plus de popup TV), Or remplace US10Y
  S&P 500/VIX dateRange=12M (daily), DXY/Or dateRange=60M (weekly)
- rateprobability: cache TTL 4h → 48h (OIS revient même sans GitHub Actions hourly)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
caty21
2026-06-27 22:02:53 +02:00
co-authored by Claude Sonnet 4.6
parent dc801638d8
commit cf70e30db6
4 changed files with 34 additions and 15 deletions
+8 -7
View File
@@ -13,11 +13,12 @@ declare global {
}
interface TvMiniChartProps {
symbol: string; // ex: "FX:EURUSD", "TVC:DXY", "SP:SPX"
label?: string; // titre affiché au-dessus
interval?: "W" | "D" | "M";
height?: number;
showInfo?: boolean; // afficher nom + prix sous le graphique
symbol: string; // ex: "FX:EURUSD", "TVC:DXY", "SP:SPX"
label?: string; // titre affiché au-dessus
interval?: "W" | "D" | "M";
dateRange?: string; // "1D","5D","1M","3M","6M","12M","60M","ALL","YTD"
height?: number;
showInfo?: boolean; // afficher nom + prix sous le graphique
}
// Script TradingView chargé une seule fois
@@ -41,7 +42,7 @@ function loadTvScript(cb: () => void) {
document.head.appendChild(s);
}
export function TvMiniChart({ symbol, label, height = 180, showInfo = true }: TvMiniChartProps) {
export function TvMiniChart({ symbol, label, dateRange = "1M", height = 180, showInfo = true }: TvMiniChartProps) {
const uid = useId().replace(/:/g, "_");
const id = `tv_mini_${uid}`;
const ref = useRef<HTMLDivElement>(null);
@@ -60,7 +61,7 @@ export function TvMiniChart({ symbol, label, height = 180, showInfo = true }: Tv
width: "100%",
height,
locale: "fr",
dateRange: "1M",
dateRange,
colorTheme: "dark",
trendLineColor: "#38bdf8",
underLineColor: "rgba(56,189,248,0.08)",