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

Function CustomChartTooltip

src/components/FieldComparisonColumn.tsx:45–59  ·  view source on GitHub ↗
({ active, payload, label }: any)

Source from the content-addressed store, hash-verified

43 );
44};
45
46const CustomChartTooltip = ({ active, payload, label }: any) => {
47 if (!active || !payload?.length) return null;
48 return (
49 <div className="rounded-lg px-3 py-2 shadow-xl border border-border/50" style={{ background: "hsl(150, 18%, 12%)" }}>
50 <div className="text-[10px] text-muted-foreground mb-1.5">{label}</div>
51 {payload.map((p: any, i: number) => (
52 <div key={i} className="flex items-center gap-2 text-xs">
53 <span className="w-2 h-2 rounded-full" style={{ backgroundColor: p.stroke || p.fill || p.color }} />
54 <span className="text-muted-foreground">{p.name || p.dataKey}</span>
55 <span className="font-semibold text-foreground ml-auto">{typeof p.value === 'number' ? p.value.toFixed(1) : p.value}</span>
56 </div>
57 ))}
58 </div>
59 );
60};
61
62function getFieldCenter(field: Field) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected