API
API
ValueCellView

ValueCellView extends BodyCellView

ํ”ผ๋ฒ— ์…€ ๋ทฐ.

Properties

height: number (opens in a new tab)

height

default: undefined

visible: boolean (opens in a new tab) readonly

visible

default: undefined

width: number (opens in a new tab)

width

default: undefined

x: number (opens in a new tab)

x

default: undefined

y: number (opens in a new tab)

y

default: undefined

Methods

applyAnnotation(style, level?): void (opens in a new tab)

annotation ์Šคํƒ€์ผ์„ ์…€ dom์— inline์œผ๋กœ ์ ์šฉํ•œ๋‹ค. ์ด์ „์— ์ ์šฉ๋œ ์†์„ฑ์€ ๋จผ์ € ์ œ๊ฑฐํ•˜๋ฏ€๋กœ, ์…€์ด ๋‹ค๋ฅธ ์œ„์น˜๋กœ ์žฌํ™œ์šฉ๋˜์–ด๋„ ์ž”์ƒ์ด ๋‚จ์ง€ ์•Š๋Š”๋‹ค.

ParameterTypeDescription
stylePartial (opens in a new tab)<Pick (opens in a new tab)<CSSStyleDeclaration (opens in a new tab), ...>>CSSAppearance ๊ฐ์ฒด. null์ด๋ฉด ์ ์šฉ๋œ annotation ์Šคํƒ€์ผ์„ ๋ชจ๋‘ ์ œ๊ฑฐ.
levelstring (opens in a new tab)info/warning/error. ์ง€์ •๋˜๋ฉด ์…€ ์šฐ์ƒ๋‹จ ์ฝ”๋„ˆ ์‚ผ๊ฐํ˜•(CSS ::before)์œผ๋กœ ํ‘œ์‹œ. null์ด๋ฉด ์ฝ”๋„ˆ ํ‘œ์‹œ๋ฅผ ์ œ๊ฑฐํ•œ๋‹ค.

applyOverlay(doc, cellBg, spanBg, bar, hideText, icon?): void (opens in a new tab)

์…€ ๋ฐฐ๊ฒฝ(heatmap)๊ณผ ๋ฐ์ดํ„ฐ๋ฐ”(databar), ์•„์ด์ฝ˜์„ ์ผ๊ด„ ์ ์šฉํ•œ๋‹ค. highlight์˜ backgroundColor๊ฐ€ ์žˆ์œผ๋ฉด heatmap๋ณด๋‹ค ์šฐ์„  ์ ์šฉ๋œ๋‹ค.

  • cellBg: ์…€ dom ๋ฐฐ๊ฒฝ (heatmap).
  • spanBg: (deprecated) ์‚ฌ์šฉ ์•ˆ ํ•จ. ํ˜ธํ™˜์„ ์œ„ํ•ด ์‹œ๊ทธ๋‹ˆ์ฒ˜๋งŒ ์œ ์ง€.
  • bar: dataBar ๋ง‰๋Œ€. ๋ณ„๋„ div๋กœ ๋ Œ๋”๋ง.
  • hideText: true๋ฉด ์…€ ๊ฐ’(ํ…์ŠคํŠธ)์„ ์ˆจ๊ธด๋‹ค (Excel "Show Bar Only").
  • icon: ์•„์ด์ฝ˜ overlay ๊ฒฐ๊ณผ. dataBar์™€ ๋…๋ฆฝ์ ์œผ๋กœ ๋™์ž‘ํ•˜๋ฉฐ dataBar ์œ„์— ๊ทธ๋ ค์ง„๋‹ค.
ParameterType
docDocument (opens in a new tab)
cellBgstring (opens in a new tab)
spanBgstring (opens in a new tab)
bar{ background: string;border: string;heightPct: number;leftPct: number;widthPct: number; }
hideTextboolean (opens in a new tab)
icon=nullResolvedIcon

dispose(): null

๊ฐ์ฒด๋ฅผ ํ•ด์ œํ•˜๊ณ  null์„ ๋ฐ˜ํ™˜ํ•œ๋‹ค.
์‚ฌ์šฉ ์˜ˆ: this._obj = this._obj.dispose();

returnย null

setHighlight(highlight): void (opens in a new tab)

๋‹ค์Œ render ํ˜ธ์ถœ์— ์ ์šฉํ•  highlight ์Šคํƒ€์ผ์„ ์„ค์ •ํ•œ๋‹ค.

highlight๋Š” ์‹œ๊ฐ์  overlay(heatmap/dataBar)์™€ ๋‹ฌ๋ฆฌ conditional formatting์˜ ์„ฑ๊ฒฉ์ด๋ผ formatter์™€ ๋™์ผ ๋ ˆ์ด์–ด์—์„œ ์ฒ˜๋ฆฌ๋œ๋‹ค.

  • color/bold/italic: highlight๋ฅผ ์ดˆ๊ธฐ๊ฐ’์œผ๋กœ ๋‘๊ณ  formatter ๊ฒฐ๊ณผ๊ฐ€ ์žˆ์œผ๋ฉด ๋ฎ์–ด์“ด๋‹ค.
  • className: render์˜ baseClassName๊ณผ ๋ถ„๋ฆฌํ•ด์„œ ๋ณ„๋„ ๊ด€๋ฆฌ.
  • backgroundColor: applyOverlay๊ฐ€ heatmap๋ณด๋‹ค ์šฐ์„  ์ ์šฉํ•œ๋‹ค.
ParameterType
highlight{ align: 'left' &#124; 'right' &#124; 'center';backgroundColor: string;bold: boolean;className: string;color: string;italic: boolean;underline: boolean; }

setStickyOffset(offset): void (opens in a new tab)

์…€์ด ๋ถ€๋ถ„์ ์œผ๋กœ ์Šคํฌ๋กค๋˜์—ˆ์„ ๋•Œ label์ด ๋ณด์ด๋Š” ์˜์—ญ ์ค‘์•™์— ํ‘œ์‹œ๋˜๋„๋ก ์˜คํ”„์…‹์„ ์ ์šฉํ•œ๋‹ค. CSS custom property๋ฅผ ํ†ตํ•ด span๊ณผ ::before ๋ชจ๋‘ ๋™์ผํ•œ ์˜คํ”„์…‹์œผ๋กœ ์ด๋™ํ•œ๋‹ค.

ParameterType
offsetnumber (opens in a new tab)