MCPcopy Create free account
hub / github.com/Thanas-R/Virdis / CustomChartTooltip

Function CustomChartTooltip

src/components/WeatherView.tsx:98–112  ·  view source on GitHub ↗
({ active, payload, label }: any)

Source from the content-addressed store, hash-verified

96 );
97};
98
99const CustomChartTooltip = ({ active, payload, label }: any) => {
100 if (!active || !payload?.length) return null;
101 return (
102 <div className="rounded-lg px-3 py-2 shadow-xl border border-border/50" style={{ background: "hsl(150, 18%, 12%)" }}>
103 <div className="text-[10px] text-muted-foreground mb-1.5">{label}</div>
104 {payload.map((p: any, i: number) => (
105 <div key={i} className="flex items-center gap-2 text-xs">
106 <span className="w-2 h-2 rounded-full" style={{ backgroundColor: p.stroke || p.fill || p.color }} />
107 <span className="text-muted-foreground">{p.name || p.dataKey}</span>
108 <span className="font-semibold text-foreground ml-auto">{typeof p.value === 'number' ? p.value.toFixed(1) : p.value}</span>
109 </div>
110 ))}
111 </div>
112 );
113};
114
115function getFieldCenter(field: Field) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected