({ active, payload, label }: any)
| 43 | ); |
| 44 | }; |
| 45 | |
| 46 | const 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 | |
| 62 | function getFieldCenter(field: Field) { |
nothing calls this directly
no outgoing calls
no test coverage detected