move legend

This commit is contained in:
Nate Kelley 2025-02-26 14:19:18 -07:00
parent 07d495c824
commit 1ca8ee048d
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
2 changed files with 13 additions and 6 deletions

View File

@ -1,9 +1,10 @@
import { createStyles } from 'antd-style';
import React, { useMemo } from 'react';
import { useMemoizedFn } from 'ahooks';
import { AppMaterialIcons } from '@/components/ui';
import { BusterChartLegendItem } from './interfaces';
import { ChartType } from '../interfaces';
import { Target } from '../../icons';
import { cn } from '@/lib/classMerge';
export const LegendItemDot: React.FC<{
color: string | undefined;
@ -55,11 +56,13 @@ export const LegendItemDot: React.FC<{
onClick={onFocusItemPreflight}
className="absolute hidden w-full items-center justify-center overflow-hidden group-hover:flex">
<div className="focus-item flex h-full w-full items-center justify-center">
<AppMaterialIcons
size={size === 'sm' ? 8 : 12}
className={cx(styles.focusDot, size)}
icon="target"
/>
<div
className={cn(
'flex items-center justify-center',
size === 'sm' ? 'text-xxs' : 'text-sm'
)}>
<Target />
</div>
</div>
</div>
)}

View File

@ -17,6 +17,10 @@
--default-border-width: 0.5px;
/* font size */
--text-3xs: 6px;
--text-3xs--line-height: 1;
--text-2xs: 8px;
--text-2xs--line-height: 1;
--text-xxs: 10px;
--text-xxs--line-height: 1;
--text-xs: 11px;