An open source alternative to Tableau. Embeddable visual analytic
TypeScript bidatadata-analysisdata-miningdata-visualizationedak6skanarieslow-codepivot-tablereacttableautableau-alternativetypescriptvegavega-litevisualization
feat: improve visual settings UX
Elwynn Chen0111dbe6cdc4
diff --git a/packages/graphic-walker/src/components/visualConfig/color-picker.tsx b/packages/graphic-walker/src/components/visualConfig/color-picker.tsxindex e7810d35..52e18350 100644--- a/packages/graphic-walker/src/components/visualConfig/color-picker.tsx+++ b/packages/graphic-walker/src/components/visualConfig/color-picker.tsx@@ -4,7 +4,7 @@ import React from 'react';import { Input } from '../ui/input';const DEFAULT_COLOR_SCHEME = ['#5B8FF9', '#FF6900', '#FCB900', '#7BDCB5', '#00D084', '#8ED1FC', '#0693E3', '#ABB8C3', '#EB144C', '#F78DA7', '#9900EF'];-export const ColorPickerComponent = ({ defaultColor, setDefaultColor, setPrimaryColorEdited, displayColorPicker, setDisplayColorPicker }) => {+export const ColorPickerComponent = ({ defaultColor, setDefaultColor, setPrimaryColorEdited, displayColorPicker, setDisplayColorPicker, align = 'left' }) => {return (<ErrorBoundaryfallback={@@ -58,7 +58,7 @@ export const ColorPickerComponent = ({ defaultColor, setDefaultColor, setPrimarysetDisplayColorPicker(true);}}></div>- <div className="absolute left-0 top-8 z-40 shadow-sm">+ <div className={`absolute ${align === 'right' ? 'right-0' : 'left-0'} top-8 z-40 shadow-sm`}>{displayColorPicker && (<StyledPickerpresetColors={DEFAULT_COLOR_SCHEME}diff --git a/packages/graphic-walker/src/components/visualConfig/config-item.tsx b/packages/graphic-walker/src/components/visualConfig/config-item.tsxindex 7aadc43f..9fbf45ef 100644--- a/packages/graphic-walker/src/components/visualConfig/config-item.tsx+++ b/packages/graphic-walker/src/components/visualConfig/config-item.tsx@@ -15,3 +15,7 @@ export function ConfigItemHeader(props: { children?: React.ReactNode }) {export function ConfigItemTitle(props: { children?: React.ReactNode }) {return <h2 className="text-xl text-foreground font-medium">{props.children}</h2>;}++export function ConfigItemDescription(props: { children?: React.ReactNode }) {+ return <p className="text-xs text-muted-foreground font-normal mt-1">{props.children}</p>;+}diff --git a/packages/graphic-walker/src/components/visualConfig/index.tsx b/packages/graphic-walker/src/components/visualConfig/index.tsxindex 58a2fa9d..cca21cdc 100644--- a/packages/graphic-walker/src/components/visualConfig/index.tsx+++ b/packages/graphic-walker/src/components/visualConfig/index.tsx@@ -9,7 +9,7 @@ import { IConfigScale, IVisualConfig, IVisualLayout, IThemeKey } from '../../intimport Toggle from '../toggle';import { ColorSchemes, extractRGBA } from './colorScheme';import { DomainScale, RangeScale } from './range-scale';-import { ConfigItemContainer, ConfigItemContent, ConfigItemHeader, ConfigItemTitle } from './config-item';+import { ConfigItemContainer, ConfigItemContent, ConfigItemDescription, ConfigItemHeader, ConfigItemTitle } from './config-item';import { KVTuple } from '../../models/utils';import { isNotEmpty } from '../../utils';import { timezones } from './timezone';@@ -20,6 +20,21 @@ import Combobox from '../dropdownSelect/combobox';import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger } from '../ui/dropdown-menu';import { vegaThemeContext } from '../../store/theme';import { ColorPickerComponent } from './color-picker';+import { Switch } from '../ui/switch';++function SettingRow(props: { title: React.ReactNode; description?: React.ReactNode; htmlFor?: string; children?: React.ReactNode }) {+ return (+ <div className="p-4 flex flex-col items-stretch gap-3 sm:flex-row sm:justify-between sm:items-center sm:gap-4">+ <div className="flex-1 min-w-0 max-w-md">+ <label htmlFor={props.htmlFor} className="text-xs font-medium leading-6">+ {props.title}+ </label>+ {props.description && <p className="text-xs text-muted-foreground">{props.description}</p>}+ </div>+ <div className="shrink-0 self-end sm:self-auto">{props.children}</div>+ </div>+ );+}function useDomainScale() {const [enableMinDomain, setEnableMinDomain] = useState(false);@@ -232,34 +247,35 @@ const VisualConfigPanel: React.FC = () => {<div className="overflow-y-auto flex-shrink-1 min-h-0 px-6"><ConfigItemContainer><ConfigItemHeader>- <ConfigItemTitle>Colors</ConfigItemTitle>+ <ConfigItemTitle>{t('config.colors')}</ConfigItemTitle>+ <ConfigItemDescription>{t('config.colors_desc')}</ConfigItemDescription></ConfigItemHeader><ConfigItemContent>- <div className="flex gap-6 flex-col md:flex-row">- <div>- <label className="block text-xs font-medium leading-6">{t('config.primary_color')}</label>+ <div className="border rounded-md divide-y">+ <SettingRow title={t('config.primary_color')} description={t('config.primary_color_desc')}><ColorPickerComponentdefaultColor={defaultColor}setDefaultColor={setDefaultColor}setPrimaryColorEdited={setPrimaryColorEdited}displayColorPicker={displayColorPicker}setDisplayColorPicker={setDisplayColorPicker}+ align="right"/>- </div>- <div>- <label className="block text-xs font-medium leading-6">- {t('config.background')} {t(`config.color`)}- </label>+ </SettingRow>+ <SettingRow+ title={`${t('config.background')} ${t(`config.color`)}`}+ description={t('config.background_desc')}+ ><ColorPickerComponentdefaultColor={background}setDefaultColor={setBackground}setPrimaryColorEdited={setBackgroundEdited}displayColorPicker={displayBackgroundPicker}setDisplayColorPicker={setDisplayBackgroundPicker}+ align="right"/>- </div>- <div>- <label className="block text-xs font-medium leading-6">{t('config.theme')}</label>+ </SettingRow>+ <SettingRow title={t('config.theme')} description={t('config.theme_desc')}><ComboboxclassName="w-48 h-fit"popClassName="w-48"@@ -273,9 +289,8 @@ const VisualConfigPanel: React.FC = () => {{ value: 'sodapop', label: 'sodapop' },]}/>- </div>- <div>- <label className="block text-xs font-medium leading-6">{t('config.color_palette')}</label>+ </SettingRow>+ <SettingRow title={t('config.color_palette')} description={t('config.color_palette_desc')}><ComboboxclassName="w-48 h-fit"popClassName="w-48"@@ -301,17 +316,22 @@ const VisualConfigPanel: React.FC = () => {label: <>{t('config.default_color_palette')}</>,})}/>- </div>+ </SettingRow></div></ConfigItemContent></ConfigItemContainer><ConfigItemContainer><ConfigItemHeader>- <div className="flex justify-between items-center">- <ConfigItemTitle>Scale</ConfigItemTitle>+ <div className="flex flex-col items-stretch gap-3 sm:flex-row sm:justify-between sm:items-start sm:gap-4">+ <div>+ <ConfigItemTitle>{t('config.scale')}</ConfigItemTitle>+ <ConfigItemDescription>{t('config.scale_desc')}</ConfigItemDescription>+ </div><DropdownMenu><DropdownMenuTrigger asChild>- <Button variant="outline">Select Scale</Button>+ <Button variant="outline" className="shrink-0 self-end sm:self-auto">+ {t('config.customize_scales')}+ </Button></DropdownMenuTrigger><DropdownMenuContent>{['row', 'column', 'color', 'theta', 'radius', 'opacity', 'size'].map((scale) => (@@ -334,78 +354,61 @@ const VisualConfigPanel: React.FC = () => {</div></ConfigItemHeader><ConfigItemContent>- {scalesSet.has('column') && (- <div>- <label className="block text-xs font-medium leading-6">{t('config.column')}</label>- <DomainScale {...columnValue} text="column" />- </div>- )}- {scalesSet.has('row') && (- <div>- <label className="block text-xs font-medium leading-6">{t('config.row')}</label>- <DomainScale {...rowValue} text="row" />- </div>- )}- {scalesSet.has('color') && (- <div>- <label className="block text-xs font-medium leading-6">{t('config.color')}</label>- <DomainScale {...colorValue} text="color" />- </div>- )}- {scalesSet.has('theta') && (- <div>- <label className="block text-xs font-medium leading-6">{t('config.theta')}</label>- <DomainScale {...thetaValue} text="theta" />- </div>- )}- {scalesSet.has('radius') && (- <div>- <label className="block text-xs font-medium leading-6">{t('config.radius')}</label>- <DomainScale {...radiusValue} text="radius" />- </div>- )}- {scalesSet.has('opacity') && (- <div>- <label className="block text-xs font-medium leading-6">{t('config.opacity')}</label>- <RangeScale {...opacityValue} text="opacity" maxRange={1} minRange={0} />- </div>- )}- {scalesSet.has('size') && (- <div>- <label className="block text-xs font-medium leading-6">{t('config.size')}</label>- <RangeScale {...sizeValue} text="size" maxRange={100} minRange={0} />- </div>- )}+ <div className="flex flex-col gap-4">+ {(+ [+ ['column', <DomainScale {...columnValue} text="column" />],+ ['row', <DomainScale {...rowValue} text="row" />],+ ['color', <DomainScale {...colorValue} text="color" />],+ ['theta', <DomainScale {...thetaValue} text="theta" />],+ ['radius', <DomainScale {...radiusValue} text="radius" />],+ ['opacity', <RangeScale {...opacityValue} text="opacity" maxRange={1} minRange={0} />],+ ['size', <RangeScale {...sizeValue} text="size" maxRange={100} minRange={0} />],+ ] as [string, React.ReactNode][]+ )+ .filter(([key]) => scalesSet.has(key))+ .map(([key, control]) => (+ <div key={key} className="border rounded-md divide-y">+ <div className="p-4">+ <h3 className="text-sm font-medium">{t(`config.${key}`)}</h3>+ <p className="text-xs text-muted-foreground">{t(`config.scale_${key}_desc`)}</p>+ </div>+ {control}+ </div>+ ))}+ {enabledScales.length === 0 && <p className="text-xs text-muted-foreground">{t('config.scale_empty')}</p>}+ </div></ConfigItemContent></ConfigItemContainer><ConfigItemContainer><ConfigItemHeader><ConfigItemTitle>{t('config.format')}</ConfigItemTitle>- <p className="text-xs">- {t(`config.formatGuidesDocs`)}:{' '}+ <ConfigItemDescription>+ {t('config.format_desc')} {t(`config.formatGuidesDocs`)}:{' '}<a target="_blank" className="hover:underline text-primary" href="https://github.com/d3/d3-format#locale_format">{t(`config.readHere`)}</a>- </p>+ .+ </ConfigItemDescription></ConfigItemHeader><ConfigItemContent>- <div className="flex gap-4">+ <div className="border rounded-md divide-y">{formatConfigList.map((fc) => (- <div className="my-2" key={fc}>- <label className="block text-xs font-medium leading-6">{t(`config.${fc}`)}</label>- <div className="mt-1">- <Input- type="text"- value={format[fc] ?? ''}- onChange={(e) => {- setFormat((f) => ({- ...f,- [fc]: e.target.value,- }));- }}- />- </div>- </div>+ <SettingRow key={fc} htmlFor={`format_${fc}`} title={t(`config.${fc}`)} description={t(`config.${fc}_desc`)}>+ <Input+ id={`format_${fc}`}+ className="w-48"+ type="text"+ placeholder={{ numberFormat: ',.2f', timeFormat: '%Y-%m-%d', normalizedNumberFormat: '.0%' }[fc]}+ value={format[fc] ?? ''}+ onChange={(e) => {+ setFormat((f) => ({+ ...f,+ [fc]: e.target.value,+ }));+ }}+ />+ </SettingRow>))}</div></ConfigItemContent>@@ -413,34 +416,31 @@ const VisualConfigPanel: React.FC = () => {<ConfigItemContainer><ConfigItemHeader><ConfigItemTitle>{t('config.independence')}</ConfigItemTitle>+ <ConfigItemDescription>{t('config.independence_desc')}</ConfigItemDescription></ConfigItemHeader><ConfigItemContent>- <div className="flex gap-x-6 gap-y-2 flex-wrap">- {GLOBAL_CONFIG.POSITION_CHANNEL_CONFIG_LIST.map((pc) => (- <Toggle- label={t(`config.${pc}`)}- key={pc}- enabled={resolve[pc] ?? false}- onChange={(e) => {- setResolve((r) => ({- ...r,- [pc]: e,- }));- }}- />- ))}- {GLOBAL_CONFIG.NON_POSITION_CHANNEL_CONFIG_LIST.map((npc) => (- <Toggle- label={t(`constant.draggable_key.${npc}`)}- key={npc}- enabled={resolve[npc] ?? false}- onChange={(e) => {- setResolve((r) => ({- ...r,- [npc]: e,- }));- }}- />+ <div className="border rounded-md divide-y">+ {[+ ...GLOBAL_CONFIG.POSITION_CHANNEL_CONFIG_LIST.map((pc) => [pc, t(`config.${pc}`)] as const),+ ...GLOBAL_CONFIG.NON_POSITION_CHANNEL_CONFIG_LIST.map((npc) => [npc, t(`constant.draggable_key.${npc}`)] as const),+ ].map(([channel, label]) => (+ <SettingRow+ key={channel}+ htmlFor={`resolve_${channel}`}+ title={label}+ description={t('config.independent_channel_desc', { channel: label })}+ >+ <Switch+ id={`resolve_${channel}`}+ checked={resolve[channel] ?? false}+ onCheckedChange={(e) => {+ setResolve((r) => ({+ ...r,+ [channel]: e,+ }));+ }}+ />+ </SettingRow>))}</div></ConfigItemContent>diff --git a/packages/graphic-walker/src/components/visualConfig/range-scale.tsx b/packages/graphic-walker/src/components/visualConfig/range-scale.tsxindex 3fd2ab42..297d1864 100644--- a/packages/graphic-walker/src/components/visualConfig/range-scale.tsx+++ b/packages/graphic-walker/src/components/visualConfig/range-scale.tsx@@ -1,45 +1,63 @@import React from 'react';import { useTranslation } from 'react-i18next';import { Slider } from '../../components/rangeslider';-import { Checkbox } from '../ui/checkbox';import { Label } from '../ui/label';import { NumberInput } from '../ui/number-input';import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '../ui/select';+import { Switch } from '../ui/switch';-export function RangeScale(props: {+function OverrideRow(props: {+ id: string;+ title: React.ReactNode;+ description: React.ReactNode;+ enabled: boolean;+ onEnabledChange: (v: boolean) => void;+ children?: React.ReactNode;+}) {+ return (+ <div className="p-4">+ <div className="flex justify-between items-center gap-4">+ <div>+ <Label htmlFor={props.id} className="text-xs font-medium leading-6 cursor-pointer">+ {props.title}+ </Label>+ <p className="text-xs text-muted-foreground">{props.description}</p>+ </div>+ <Switch id={props.id} checked={props.enabled} onCheckedChange={props.onEnabledChange} />+ </div>+ {props.enabled && props.children && <div className="mt-3">{props.children}</div>}+ </div>+ );+}++export function DomainScale(props: {text: string;- maxRange: number;- minRange: number;enableMaxDomain: boolean;enableMinDomain: boolean;- enableRange: boolean;enableType: boolean;- rangeMax: number;- rangeMin: number;domainMax: number;domainMin: number;type: 'linear' | 'log' | 'pow' | 'sqrt' | 'symlog';setEnableMinDomain: (v: boolean) => void;setEnableMaxDomain: (v: boolean) => void;- setEnableRange: (v: boolean) => void;setEnableType: (v: boolean) => void;setDomainMin: (v: number) => void;setDomainMax: (v: number) => void;- setRangeMin: (v: number) => void;- setRangeMax: (v: number) => void;setType: (v: 'linear' | 'log' | 'pow' | 'sqrt' | 'symlog') => void;}) {const { t } = useTranslation();return (- <div className="flex md:flex-row flex-col gap-6 my-2">- <div className="flex flex-col space-y-2 items-start">- <div className="flex items-center space-x-2">- <Checkbox id={`type_${props.text}`} checked={props.enableType} onCheckedChange={props.setEnableType} />- <Label htmlFor={`type_${props.text}`}>{t('config.type')}</Label>- </div>- <Select value={props.type} disabled={!props.enableType} onValueChange={props.setType}>- <SelectTrigger>+ <>+ <OverrideRow+ id={`type_${props.text}`}+ title={t('config.type')}+ description={t('config.scale_type_desc')}+ enabled={props.enableType}+ onEnabledChange={props.setEnableType}+ >+ <Select value={props.type} onValueChange={props.setType}>+ <SelectTrigger className="w-40"><SelectValue /></SelectTrigger><SelectContent>@@ -50,15 +68,16 @@ export function RangeScale(props: {<SelectItem value="symlog">Symlog</SelectItem></SelectContent></Select>- </div>-- <div className="flex flex-col space-y-2 items-start">- <div className="flex items-center space-x-2">- <Checkbox id={`min_domain_${props.text}`} checked={props.enableMinDomain} onCheckedChange={props.setEnableMinDomain} />- <Label htmlFor={`min_domain_${props.text}`}>{t('config.min_domain')}</Label>- </div>+ </OverrideRow>+ <OverrideRow+ id={`min_domain_${props.text}`}+ title={t('config.min_domain')}+ description={t('config.min_domain_desc')}+ enabled={props.enableMinDomain}+ onEnabledChange={props.setEnableMinDomain}+ ><NumberInput- className="w-32"+ className="w-40"value={props.domainMin}onChange={(e) => {const v = Number(e.target.value);@@ -67,16 +86,17 @@ export function RangeScale(props: {}}}type="number"- disabled={!props.enableMinDomain}/>- </div>- <div className="flex flex-col space-y-2 items-start">- <div className="flex items-center space-x-2">- <Checkbox id={`max_domain_${props.text}`} checked={props.enableMaxDomain} onCheckedChange={props.setEnableMaxDomain} />- <Label htmlFor={`max_domain_${props.text}`}>{t('config.max_domain')}</Label>- </div>+ </OverrideRow>+ <OverrideRow+ id={`max_domain_${props.text}`}+ title={t('config.max_domain')}+ description={t('config.max_domain_desc')}+ enabled={props.enableMaxDomain}+ onEnabledChange={props.setEnableMaxDomain}+ ><NumberInput- className="w-32"+ className="w-40"value={props.domainMax}onChange={(e) => {const v = Number(e.target.value);@@ -85,110 +105,64 @@ export function RangeScale(props: {}}}type="number"- disabled={!props.enableMaxDomain}/>- </div>- <div className="flex flex-col items-start w-48 space-y-2">- <div className="flex items-center space-x-2">- <Checkbox id={`range_${props.text}`} checked={props.enableRange} onCheckedChange={props.setEnableRange} />- <Label htmlFor={`range_${props.text}`}>{t('config.range')}</Label>- </div>- <div className="flex w-full flex-col space-y-2 pt-2">- <Slider- disabled={!props.enableRange}- max={props.maxRange}- min={props.minRange}- value={[props.rangeMin, props.rangeMax]}- onValueChange={([min, max]) => {- props.setRangeMin(min);- props.setRangeMax(max);- }}- step={props.maxRange < 2 ? 0.01 : 1}- />- <div className="relative w-full h-4">- <div className="text-xs absolute left-0 text-foreground inset-y-0">{props.rangeMin}</div>- <div className="text-xs absolute right-0 text-foreground inset-y-0">{props.rangeMax}</div>- </div>- </div>- </div>- </div>+ </OverrideRow>+ </>);}-export function DomainScale(props: {+export function RangeScale(props: {text: string;+ maxRange: number;+ minRange: number;enableMaxDomain: boolean;enableMinDomain: boolean;+ enableRange: boolean;enableType: boolean;+ rangeMax: number;+ rangeMin: number;domainMax: number;domainMin: number;type: 'linear' | 'log' | 'pow' | 'sqrt' | 'symlog';setEnableMinDomain: (v: boolean) => void;setEnableMaxDomain: (v: boolean) => void;+ setEnableRange: (v: boolean) => void;setEnableType: (v: boolean) => void;setDomainMin: (v: number) => void;setDomainMax: (v: number) => void;+ setRangeMin: (v: number) => void;+ setRangeMax: (v: number) => void;setType: (v: 'linear' | 'log' | 'pow' | 'sqrt' | 'symlog') => void;}) {const { t } = useTranslation();return (- <div className="flex md:flex-row flex-col gap-6 my-2">- <div className="flex flex-col space-y-2 items-start">- <div className="flex items-center space-x-2">- <Checkbox id={`type_${props.text}`} checked={props.enableType} onCheckedChange={props.setEnableType} />- <Label htmlFor={`type_${props.text}`}>{t('config.type')}</Label>- </div>- <Select value={props.type} disabled={!props.enableType} onValueChange={props.setType}>- <SelectTrigger>- <SelectValue />- </SelectTrigger>- <SelectContent>- <SelectItem value="linear">Linear</SelectItem>- <SelectItem value="log">Log</SelectItem>- <SelectItem value="pow">Pow</SelectItem>- <SelectItem value="sqrt">Sqrt</SelectItem>- <SelectItem value="symlog">Symlog</SelectItem>- </SelectContent>- </Select>- </div>-- <div className="flex flex-col space-y-2 items-start">- <div className="flex items-center space-x-2">- <Checkbox id={`min_domain_${props.text}`} checked={props.enableMinDomain} onCheckedChange={props.setEnableMinDomain} />- <Label htmlFor={`min_domain_${props.text}`}>{t('config.min_domain')}</Label>- </div>- <NumberInput- className="w-32"- value={props.domainMin}- onChange={(e) => {- const v = Number(e.target.value);- if (!isNaN(v)) {- props.setDomainMin(v);- }- }}- type="number"- disabled={!props.enableMinDomain}- />- </div>- <div className="flex flex-col space-y-2 items-start">- <div className="flex items-center space-x-2">- <Checkbox id={`max_domain_${props.text}`} checked={props.enableMaxDomain} onCheckedChange={props.setEnableMaxDomain} />- <Label htmlFor={`max_domain_${props.text}`}>{t('config.max_domain')}</Label>+ <>+ <DomainScale {...props} />+ <OverrideRow+ id={`range_${props.text}`}+ title={t('config.range')}+ description={t('config.range_desc')}+ enabled={props.enableRange}+ onEnabledChange={props.setEnableRange}+ >+ <div className="flex max-w-md flex-col space-y-2 pt-2">+ <Slider+ max={props.maxRange}+ min={props.minRange}+ value={[props.rangeMin, props.rangeMax]}+ onValueChange={([min, max]) => {+ props.setRangeMin(min);+ props.setRangeMax(max);+ }}+ step={props.maxRange < 2 ? 0.01 : 1}+ />+ <div className="relative w-full h-4">+ <div className="text-xs absolute left-0 text-foreground inset-y-0">{props.rangeMin}</div>+ <div className="text-xs absolute right-0 text-foreground inset-y-0">{props.rangeMax}</div>+ </div></div>- <NumberInput- className="w-32"- value={props.domainMax}- onChange={(e) => {- const v = Number(e.target.value);- if (!isNaN(v)) {- props.setDomainMax(v);- }- }}- type="number"- disabled={!props.enableMaxDomain}- />- </div>- </div>+ </OverrideRow>+ </>);}diff --git a/packages/graphic-walker/src/locales/en-US.json b/packages/graphic-walker/src/locales/en-US.jsonindex 6f80cad6..b85be45a 100644--- a/packages/graphic-walker/src/locales/en-US.json+++ b/packages/graphic-walker/src/locales/en-US.json@@ -46,7 +46,34 @@"svg_desc": "Use SVG renderer instead of Canvas for higher quality but potentially slower performance.","timezone_settings": "Timezone Settings","timezone_settings_desc": "Configure how time-based data is displayed across different timezones.",- "customOffset_desc": "Specify a custom timezone for displaying time-based data."+ "customOffset_desc": "Specify a custom timezone for displaying time-based data.",+ "colors": "Colors",+ "colors_desc": "Customize the colors, theme and palette used by your charts.",+ "primary_color_desc": "The default color of marks when no field is assigned to the Color channel.",+ "background_desc": "The background color of the chart canvas. Transparent by default.",+ "theme_desc": "The overall chart style preset, controlling axes, grid lines and default colors.",+ "color_palette_desc": "The color scheme used when a field is assigned to the Color channel.",+ "scale": "Scale",+ "scale_desc": "Scales control how data values are mapped to visual properties such as position, size and opacity. They are computed automatically from your data — turn on an override below only when you need manual control.",+ "customize_scales": "Customize channels",+ "scale_empty": "No channel selected. Use “Customize channels” to pick a channel whose scale you want to adjust.",+ "scale_column_desc": "The horizontal position scale (columns / x-axis).",+ "scale_row_desc": "The vertical position scale (rows / y-axis).",+ "scale_color_desc": "The scale mapping data values to the color gradient.",+ "scale_theta_desc": "The angle scale used by arc and pie charts.",+ "scale_radius_desc": "The radius scale used by arc and pie charts.",+ "scale_opacity_desc": "The scale mapping data values to mark transparency.",+ "scale_size_desc": "The scale mapping data values to mark size.",+ "scale_type_desc": "Apply a mathematical transform (log, sqrt, …) when mapping data values. Useful for skewed data.",+ "min_domain_desc": "Manually set the data value mapped to the low end of the scale.",+ "max_domain_desc": "Manually set the data value mapped to the high end of the scale.",+ "range_desc": "Limit the visual output between a minimum and maximum (e.g. the smallest and largest mark size).",+ "format_desc": "Control how numbers and dates are displayed in axes, legends and tooltips using d3-format patterns. Leave a field empty to use the default formatting.",+ "numberFormat_desc": "Applied to measure values. Example: ',.2f' displays 1234.5 as 1,234.50.",+ "timeFormat_desc": "Applied to date and time values. Example: '%Y-%m-%d' displays dates as 2024-01-30.",+ "normalizedNumberFormat_desc": "Applied to percentages when the stack mode is 'normalized'. Example: '.0%' displays 0.25 as 25%.",+ "independence_desc": "When a chart is split into several subviews (facets), all subviews share the same scales by default so they are directly comparable. Turn on a channel to let each subview compute its own scale independently.",+ "independent_channel_desc": "Each subview uses its own {{channel}} scale."},"explain": {"title": "Explain Data",diff --git a/packages/graphic-walker/src/locales/ja-JP.json b/packages/graphic-walker/src/locales/ja-JP.jsonindex 82d784c8..a5ae49f5 100644--- a/packages/graphic-walker/src/locales/ja-JP.json+++ b/packages/graphic-walker/src/locales/ja-JP.json@@ -41,7 +41,38 @@"svg_desc": "高品質だがパフォーマンスが低下する可能性のあるSVGレンダラーを使用します。","timezone_settings": "タイムゾーン設定","timezone_settings_desc": "異なるタイムゾーン間での時間ベースのデータの表示方法を設定します。",- "customOffset_desc": "時間ベースのデータを表示するためのカスタムタイムゾーンを指定します。"+ "customOffset_desc": "時間ベースのデータを表示するためのカスタムタイムゾーンを指定します。",+ "row": "行",+ "column": "列",+ "theta": "角度",+ "radius": "半径",+ "colors": "色",+ "colors_desc": "チャートで使用する色、テーマ、パレットをカスタマイズします。",+ "primary_color_desc": "色チャネルにフィールドが割り当てられていないときに使われるデフォルトの色。",+ "background_desc": "チャートキャンバスの背景色。デフォルトは透明です。",+ "theme_desc": "軸、グリッド線、デフォルトカラーを制御するチャート全体のスタイルプリセット。",+ "color_palette_desc": "色チャネルにフィールドを割り当てたときに使われる配色。",+ "scale": "スケール",+ "scale_desc": "スケールはデータ値を位置・サイズ・不透明度などの視覚属性へ変換する方法を決めます。通常はデータから自動計算されます。手動で制御したい場合のみ、下のオーバーライドを有効にしてください。",+ "customize_scales": "チャネルを選択",+ "scale_empty": "チャネルが選択されていません。「チャネルを選択」からスケールを調整するチャネルを選んでください。",+ "scale_column_desc": "水平位置のスケール(列 / x軸)。",+ "scale_row_desc": "垂直位置のスケール(行 / y軸)。",+ "scale_color_desc": "データ値を色のグラデーションに対応付けるスケール。",+ "scale_theta_desc": "円弧・円グラフで使われる角度スケール。",+ "scale_radius_desc": "円弧・円グラフで使われる半径スケール。",+ "scale_opacity_desc": "データ値を図形の不透明度に対応付けるスケール。",+ "scale_size_desc": "データ値を図形のサイズに対応付けるスケール。",+ "scale_type_desc": "データ値の変換方法(log、sqrt など)を指定します。偏った分布のデータに便利です。",+ "min_domain_desc": "スケールの下限に対応するデータ値を手動で設定します。",+ "max_domain_desc": "スケールの上限に対応するデータ値を手動で設定します。",+ "range_desc": "視覚的な出力の最小値と最大値を制限します(例:図形サイズの最小・最大)。",+ "format_desc": "d3-format のパターンを使って、軸・凡例・ツールチップでの数値や日付の表示方法を制御します。空欄の場合はデフォルトの書式が使われます。",+ "numberFormat_desc": "メジャー値に適用されます。例:',.2f' は 1234.5 を 1,234.50 と表示します。",+ "timeFormat_desc": "日付・時刻の値に適用されます。例:'%Y-%m-%d' は日付を 2024-01-30 と表示します。",+ "normalizedNumberFormat_desc": "スタックモードが「正規化」のとき、割合に適用されます。例:'.0%' は 0.25 を 25% と表示します。",+ "independence_desc": "チャートが複数のサブビュー(ファセット)に分割されている場合、比較しやすいようにデフォルトではすべてのサブビューが同じスケールを共有します。チャネルを有効にすると、各サブビューが独自のスケールを計算します。",+ "independent_channel_desc": "各サブビューが独自の{{channel}}スケールを使用します。"},"explain": {"title": "データの説明",diff --git a/packages/graphic-walker/src/locales/zh-CN.json b/packages/graphic-walker/src/locales/zh-CN.jsonindex 078c89eb..40edec23 100644--- a/packages/graphic-walker/src/locales/zh-CN.json+++ b/packages/graphic-walker/src/locales/zh-CN.json@@ -41,7 +41,38 @@"svg_desc": "使用SVG渲染器代替Canvas,可获得更高质量但可能降低性能。","timezone_settings": "时区设置","timezone_settings_desc": "配置时间数据在不同时区之间的显示方式。",- "customOffset_desc": "为显示基于时间的数据指定自定义时区。"+ "customOffset_desc": "为显示基于时间的数据指定自定义时区。",+ "row": "行",+ "column": "列",+ "theta": "角度",+ "radius": "半径",+ "colors": "颜色",+ "colors_desc": "自定义图表使用的颜色、主题与调色板。",+ "primary_color_desc": "未将字段分配到颜色通道时,图形使用的默认颜色。",+ "background_desc": "图表画布的背景颜色,默认为透明。",+ "theme_desc": "图表的整体样式预设,控制坐标轴、网格线和默认颜色。",+ "color_palette_desc": "将字段分配到颜色通道时使用的配色方案。",+ "scale": "比例尺",+ "scale_desc": "比例尺决定数据值如何映射到位置、大小、透明度等视觉属性。比例尺默认根据数据自动计算,仅在需要手动控制时开启下方的覆盖项。",+ "customize_scales": "选择通道",+ "scale_empty": "尚未选择通道。点击“选择通道”来挑选需要调整比例尺的通道。",+ "scale_column_desc": "水平位置比例尺(列 / x轴)。",+ "scale_row_desc": "垂直位置比例尺(行 / y轴)。",+ "scale_color_desc": "将数据值映射到颜色渐变的比例尺。",+ "scale_theta_desc": "弧形图和饼图使用的角度比例尺。",+ "scale_radius_desc": "弧形图和饼图使用的半径比例尺。",+ "scale_opacity_desc": "将数据值映射到图形透明度的比例尺。",+ "scale_size_desc": "将数据值映射到图形大小的比例尺。",+ "scale_type_desc": "在映射数据值时应用数学变换(log、sqrt 等),适用于偏态分布的数据。",+ "min_domain_desc": "手动设置映射到比例尺低端的数据值。",+ "max_domain_desc": "手动设置映射到比例尺高端的数据值。",+ "range_desc": "限制视觉输出的最小值和最大值(例如最小和最大的图形尺寸)。",+ "format_desc": "使用 d3-format 格式控制坐标轴、图例和提示框中数字与日期的显示方式。留空则使用默认格式。",+ "numberFormat_desc": "应用于度量值。例如 ',.2f' 会将 1234.5 显示为 1,234.50。",+ "timeFormat_desc": "应用于日期时间值。例如 '%Y-%m-%d' 会将日期显示为 2024-01-30。",+ "normalizedNumberFormat_desc": "在堆叠模式为“归一化”时应用于百分比。例如 '.0%' 会将 0.25 显示为 25%。",+ "independence_desc": "当图表被拆分为多个子视图(分面)时,默认所有子视图共享相同的比例尺以便直接比较。开启某个通道后,每个子视图将独立计算自己的比例尺。",+ "independent_channel_desc": "每个子视图使用独立的{{channel}}比例尺。"},"explain": {"title": "数据解释",