From 7e3810976b1230933515beaff44b4220b71d5aeb Mon Sep 17 00:00:00 2001 From: bbsqq <1491812683@qq.com> Date: Mon, 11 Mar 2024 11:01:17 +0800 Subject: [PATCH] docs(ava-react/ntv): refine ntv palette props code and site docs --- packages/ava-react/src/NarrativeTextVis/types/props.ts | 8 ++++++++ site/docs/api/ntv/intro.en.md | 4 ++-- site/docs/api/ntv/intro.zh.md | 4 ++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/ava-react/src/NarrativeTextVis/types/props.ts b/packages/ava-react/src/NarrativeTextVis/types/props.ts index 8403d53a..1ba40133 100644 --- a/packages/ava-react/src/NarrativeTextVis/types/props.ts +++ b/packages/ava-react/src/NarrativeTextVis/types/props.ts @@ -14,7 +14,15 @@ export type ThemeType = 'light' | 'dark'; export type SizeType = 'normal' | 'small'; export type PaletteType = Partial<{ color: string; + /** + * @description Compare the indicator with the assessment attribute value of 'positive'. The color Settings are displayed + * @description.zh-CN 对比类指标,对应 assessment 属性值 'positive' 显示颜色设置 + */ positiveColor: string; + /** + * @description Compare the indicator with the assessment attribute value of 'negative'. The color Settings are displayed + * @description.zh-CN 对比类指标,对应 assessment 属性值为 'negative' 显示颜色设置 + */ negativeColor: string; }>; diff --git a/site/docs/api/ntv/intro.en.md b/site/docs/api/ntv/intro.en.md index 26c2df3b..e5e5cedb 100644 --- a/site/docs/api/ntv/intro.en.md +++ b/site/docs/api/ntv/intro.en.md @@ -35,9 +35,9 @@ type PaletteConfig = Partial< EntityType | 'text', { /** color */ color: string, - /** color when metadata.assessment equal 'positive' */ + /** Compare the indicator with the assessment attribute value of 'positive'. The color Settings are displayed */ positiveColor: string; - /** color when metadata.assessment equal 'negative' */ + /** Compare the indicator with the assessment attribute value of 'negative'. The color Settings are displayed */ negativeColor: string; } > diff --git a/site/docs/api/ntv/intro.zh.md b/site/docs/api/ntv/intro.zh.md index 1e972631..cc3af6c3 100644 --- a/site/docs/api/ntv/intro.zh.md +++ b/site/docs/api/ntv/intro.zh.md @@ -35,9 +35,9 @@ type PaletteConfig = Partial< EntityType | 'text', { /** 颜色 */ color: string, - /** 当 metadata.assessment 为 'positive' 时的颜色 */ + /** 对比类指标,对应 assessment 属性值 'positive' 显示颜色设置 */ positiveColor: string; - /** 当 metadata.assessment 为 'negative' 时的颜色 */ + /** 对比类指标,对应 assessment 属性值为 'negative' 显示颜色设置 */ negativeColor: string; } >