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으로 적용한다. 이전에 적용된 속성은 먼저 제거하므로, 셀이 다른 위치로 재활용되어도 잔상이 남지 않는다.
| Parameter | Type | Description |
|---|---|---|
| style | Partial (opens in a new tab)<Pick (opens in a new tab)<CSSStyleDeclaration (opens in a new tab), ...>> | CSSAppearance 객체. null이면 적용된 annotation 스타일을 모두 제거. |
| level | string (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 위에 그려진다.
| Parameter | Type |
|---|---|
| doc | Document (opens in a new tab) |
| cellBg | string (opens in a new tab) |
| spanBg | string (opens in a new tab) |
| bar | { background: string;border: string;heightPct: number;leftPct: number;widthPct: number; } |
| hideText | boolean (opens in a new tab) |
icon=null | ResolvedIcon |
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보다 우선 적용한다.
| Parameter | Type |
|---|---|
| highlight | { align: 'left' | 'right' | '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 모두 동일한 오프셋으로 이동한다.
| Parameter | Type |
|---|---|
| offset | number (opens in a new tab) |