From 9271390bb07938da83fc7943ef5d8f1f80ba5423 Mon Sep 17 00:00:00 2001 From: Kanit Wongsuphasawat Date: Wed, 28 Aug 2024 08:24:20 -0700 Subject: [PATCH] fix: remove VL_ONLY_RECT_CONFIG for ticks --- src/mark.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/mark.ts b/src/mark.ts index ca6819ae1f..dff3d63b81 100644 --- a/src/mark.ts +++ b/src/mark.ts @@ -327,14 +327,21 @@ const VL_ONLY_MARK_CONFIG_INDEX: Flag> = { export const VL_ONLY_MARK_CONFIG_PROPERTIES = keys(VL_ONLY_MARK_CONFIG_INDEX); +const VL_ONLY_RECT_CONFIG: (keyof RectConfig)[] = [ + 'binSpacing', + 'continuousBandSize', + 'discreteBandSize', + 'minBandSize' +]; + export const VL_ONLY_MARK_SPECIFIC_CONFIG_PROPERTY_INDEX: { [k in Mark]?: (keyof Required>[k])[]; } = { area: ['line', 'point'], - bar: ['binSpacing', 'continuousBandSize', 'discreteBandSize', 'minBandSize'], - rect: ['binSpacing', 'continuousBandSize', 'discreteBandSize', 'minBandSize'], + bar: VL_ONLY_RECT_CONFIG, + rect: VL_ONLY_RECT_CONFIG, line: ['point'], - tick: ['bandSize', 'thickness'] + tick: ['bandSize', 'thickness', ...VL_ONLY_RECT_CONFIG] }; export const defaultMarkConfig: MarkConfig = {