add hebrew + new cpu charts refactoring

This commit is contained in:
henrygd
2025-11-01 13:34:30 -04:00
parent 6a562ce03b
commit aaa93b84d2
6 changed files with 51 additions and 41 deletions

View File

@@ -257,14 +257,17 @@ const ChartLegendContent = React.forwardRef<
Pick<RechartsPrimitive.LegendProps, "payload" | "verticalAlign"> & {
hideIcon?: boolean
nameKey?: string
reverse?: boolean
}
>(({ className, payload, verticalAlign = "bottom" }, ref) => {
>(({ className, payload, verticalAlign = "bottom", reverse = false }, ref) => {
// const { config } = useChart()
if (!payload?.length) {
return null
}
const reversedPayload = reverse ? [...payload].reverse() : payload
return (
<div
ref={ref}
@@ -274,7 +277,7 @@ const ChartLegendContent = React.forwardRef<
className
)}
>
{payload.map((item) => {
{reversedPayload.map((item) => {
// const key = `${nameKey || item.dataKey || 'value'}`
// const itemConfig = getPayloadConfigFromPayload(config, item, key)