PivotRowHeader extends PivotHeader
Pivot row header model.
Represents a row header in a pivot table.
Properties
static defaults: PivotRowHeaderOptions readonly
๊ฐ ํด๋์ค๋ณ ๊ธฐ๋ณธ ์ค์ ๊ฐ๋ค.
ํ์ ํด๋์ค์์ ์ฌ์ ์ํ๋ค.
๊ฐ์ฒด ์ธ์คํด์ค์ _op์๋ ๋ช
์์ ์ผ๋ก ์ค์ ๋ ๊ฐ๋ค๋ง ๋ค์ด๊ฐ๋ฏ๋ก,
ํจ๊ณผ ๊ฐ(effective value)์ ์ฝ์ ๋๋ ํญ์ ์ด ๊ธฐ๋ณธ๊ฐ์ fallback์ผ๋ก ์ฌ์ฉํด์ผ ํ๋ค.(single-source-of-truth)
default: undefined
colCount: number (opens in a new tab) readonly
Number of header columns.
default: undefined
columns: Array (opens in a new tab)<PivotRowHeaderColumn> readonly
Gets the row header columns.
default: undefined
rowCount: number (opens in a new tab) readonly
Number of header rows.
default: undefined
table: PivotTable readonly
Gets the pivot table associated with this item.
default: undefined
visible: boolean (opens in a new tab)
ํ์ ์ฌ๋ถ.
default: undefined
visibleRowCount: number (opens in a new tab) readonly
Number of visible header rows (collapsed ๋ฐ์).
default: undefined
visibleRows: Array (opens in a new tab)<PivotRow> readonly
ํ์๋๋ row ์ธ๋ฑ์ค ๋ฐฐ์ด.
default: undefined
widthStore: ColumnWidthStore readonly
์ปฌ๋ผ๋ณ ๋๋น ์ ์ฅ์.
์ฌ์ฉ์/์๋ ๊ณ์ฐ ๋๋น๋ฅผ ์์ ํค๋ก ๋ณด๊ดํ๋ค.
default: undefined
Methods
bool(prop): boolean (opens in a new tab)
boolean (opens in a new tab) ํ์
์ ์ต์
๊ฐ์ ํนํ๋ prop() ๋ฉ์๋. prop()๊ณผ ๋ฌ๋ฆฌ boolean (opens in a new tab)์ผ๋ก ๋ณํํด์ ๋ฐํํ๋ค.
ํด์ ์์๋ prop()๊ณผ ๋์ผํ๋ค(๋ช
์๊ฐ(_op) โ preset โ ํด๋์ค defaults).
| Parameter | Type | Description |
|---|---|---|
| prop | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
returnย boolean (opens in a new tab) ํ์
์ ์ต์
๊ฐ.
boolAt(path): boolean (opens in a new tab)
์ (dot) ํ๊ธฐ๋ฒ์ผ๋ก ๊ฒฝ๋ก๋ฅผ ์ง์ ํด์ boolean (opens in a new tab) ํ์
์ ์ต์
๊ฐ์ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| path | string (opens in a new tab) | ๊ฒฝ๋ก ๋ฌธ์์ด |
returnย ๊ฒฝ๋ก์ ํด๋นํ๋ boolean (opens in a new tab) ํ์
์ ์ต์
๊ฐ ๋๋ false
clean(recursive?): this
_op์ ๋ช
์์ ์ผ๋ก ์ค์ ๋์ด ์์ง๋ง ๊ฐ์ด ํ์ฌ defaults์ ๋์ผํ ํญ๋ชฉ๋ค์ ์ ๊ฑฐํด
_op๋ฅผ minimal delta ์ํ๋ก ์ ๊ทํํ๋ค.
[์ฃผ์] ๋๋ถ๋ถ์ ๊ฒฝ์ฐ ํธ์ถํ ํ์๊ฐ ์๋ค.
- ํจ๊ณผ ๊ฐ(
prop/num/props)์ ์ํฅ ์์. - ์ง๋ ฌํ(
saveOptions)๋ ์ด์ฐจํผ defaults์ ๊ฐ์ ๊ฐ์ ํํฐ๋งํ๋ฏ๋ก ๊ฒฐ๊ณผ๊ฐ ๋์ผํ๋ค. ์ฆ ์ธ๋ถ ์ ์ฅ ๊ฒฐ๊ณผ๋ clean ์ ํ๊ฐ ๊ฐ๋ค.
clean์ด ์ค์ ๋ก ์ฐจ์ด๋ฅผ ๋ง๋๋ ๊ฒฝ์ฐ๋ ๋ค์๊ณผ ๊ฐ๋ค.
_op์ ๋ฉ๋ชจ๋ฆฌ ์ฌ์ฉ์ ์ค์ด๊ณ ์ถ์ ๋(loadOptions๋ก ํฐ source๋ฅผ ์ฝ์ด๋ค์ธ ์งํ ๋ฑ).getOption()/saveOption()์ฒ๋ผ _op์ own value๋ฅผ ๊ทธ๋๋ก ๋ฐํํ๋ API์ ๊ฒฐ๊ณผ๋ฅผ "์ฌ์ฉ์๊ฐ ๋ช ์ํ๋๊ฐ"์ ์๋ฏธ๋ก ์ฌ์ฉํด์ผ ํ ๋(์: ๋์์ด๋ UI์ "๊ธฐ๋ณธ๊ฐ ์ฌ์ฉ ์ค" ํ์). ์ด ๊ฒฝ์ฐ clean ํ์๋ defaults์ ๊ฐ์ ๊ฐ๋ค์ดundefined๋ก ๋ณด๊ณ ๋๋ค.
| Parameter | Type | Description |
|---|---|---|
| recursive | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด ๋ชจ๋ ์์ ๋ชจ๋ธ์ ๋ํด์๋ ์ฌ๊ท์ ์ผ๋ก ์ํํ๋ค. ๊ธฐ๋ณธ๊ฐ: true |
returnย ๋ชจ๋ธ ๊ฐ์ฒด ์์
clearAllColumnWidths(): void (opens in a new tab)
๋ณด๊ด๋ ๋ชจ๋ ๋๋น ํญ๋ชฉ์ ์ ๊ฑฐํ๋ค.
clearColumnWidth(col): boolean (opens in a new tab)
์ปฌ๋ผ i์ ๋ณด๊ด ํญ๋ชฉ์ ์ ๊ฑฐํ๋ค. (์ฌ์ฉ์/์๋ ๋ชจ๋)
| Parameter | Type |
|---|---|
| col | number (opens in a new tab) |
clearOptions(recursive?, render?): this
๋ช
์์ ์ผ๋ก ์ค์ ๋ ๋ชจ๋ ๋ชจ๋ธ ์ค์ ๊ฐ๋ค์ ์ ๊ฑฐํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| recursive | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด ๋ชจ๋ ์์ ๋ชจ๋ธ์ ๋ํด์๋ ์ฌ๊ท์ ์ผ๋ก ์ ๊ฑฐํ๋ค. ๊ธฐ๋ณธ๊ฐ: false |
| render | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด ์ต์ ๋ณ๊ฒฝ ์ ์ปจํธ๋กค์ ๋ค์ ๊ทธ๋ฆฐ๋ค. ๊ธฐ๋ณธ๊ฐ: true |
returnย ๋ชจ๋ธ ๊ฐ์ฒด ์์
deleteAt(path, render?): any (opens in a new tab)
๋ช
์์ ์ผ๋ก ์ค์ ๋ ํ์ ๋ชจ๋ธ์ ์ค์ ๊ฐ์ ์ ๊ฑฐํด์ ๋ชจ๋ธ์ ๊ธฐ๋ณธ ๊ฐ์ด ์ ์ฉ๋๋๋ก ํ๋ค.
path ๋งค๊ฐ๋ณ์๋ ํ์ ๋ชจ๋ธ์ ์์ฑ ์ด๋ฆ์ ์ (.)์ผ๋ก ๊ตฌ๋ถํด์ ์ง์ ํ๋ค.
์๋ฅผ ๋ค์ด, "axis.x"๋ axis ๋ชจ๋ธ์ x ์์ฑ์ ์๋ฏธํ๋ค.
render์ force ๋งค๊ฐ๋ณ์๋ toggleOption๊ณผ ๋์ผํ๋ค.
| Parameter | Type |
|---|---|
| path | string (opens in a new tab) |
| render | boolean (opens in a new tab) |
dispose(): null
๊ฐ์ฒด๋ฅผ ํด์ ํ๊ณ null์ ๋ฐํํ๋ค.
์ฌ์ฉ ์: this._obj = this._obj.dispose();
returnย null
fitColumn(col, measurer, opts?): void (opens in a new tab)
๋จ์ผ ์ปฌ๋ผ fit.
| Parameter | Type |
|---|---|
| col | number (opens in a new tab) |
| measurer | ITextMeasurer |
| opts | { mode: 'normal' | 'precise' | 'exact'; } |
fitColumns(measurer, opts?): void (opens in a new tab)
์ปฌ๋ผ๋ณ ๋๋น๋ฅผ ์ฌ๊ณ์ฐํด์ store์ ๋ณด๊ดํ๋ค.
measurer๊ฐ ์ปฌ๋ผ๋ณ ํ๋ณด๋ค์ ์ธก์ ํ๊ณ , ๊ทธ max๋ฅผ ์ปฌ๋ผ ํญ์ผ๋ก ์ฌ์ฉํ๋ค.
์ฌ์ฉ์๊ฐ ๋ช
์ํ('user') ๋๋น๋ ๋ณด์กด๋๋ค.
| Parameter | Type | Description |
|---|---|---|
| measurer | ITextMeasurer | view ์ธก์์ ์ฃผ์ ๋ ์ธก์ ์ |
| opts | { cols: Array<number>;mode: 'normal' | 'precise' | 'exact'; } |
getOption(option): any (opens in a new tab)
์ต์
๊ฐ์ ์ฝ๋๋ค.
prop()๊ณผ ๋ฌ๋ฆฌ ํจ๊ณผ ๊ฐ์ด ์๋ ๋ช
์์ ์ผ๋ก ์ค์ ๋ ๊ฐ๋ง ์ฝ๋๋ค. ์ค์ ๋์ง ์์ ์ต์
์ undefined๋ฅผ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| option | string (opens in a new tab) | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
returnย ๋ช
์์ ์ผ๋ก ์ค์ ๋ ๊ฐ ๋๋ undefined
getOptionAt(path): any (opens in a new tab)
์ (dot) ํ๊ธฐ๋ฒ์ผ๋ก ๊ฒฝ๋ก๋ฅผ ์ง์ ํด์ ์ต์
๊ฐ์ ์ฝ๋๋ค.
| Parameter | Type | Description |
|---|---|---|
| path | string (opens in a new tab) | ๊ฒฝ๋ก ๋ฌธ์์ด |
returnย ๊ฒฝ๋ก์ ํด๋นํ๋ ์ต์
๊ฐ ๋๋ undefined
getStoredColumnWidth(col): number (opens in a new tab)
์ปฌ๋ผ i์ ๋ณด๊ด๋ ๋๋น ๊ฐ. (์์ผ๋ฉด undefined)
| Parameter | Type |
|---|---|
| col | number (opens in a new tab) |
init(): this
ํน์ ๋ถ๋ชจ์ ๋ง์ดํ ๋์ง ์์ ๋ ๋ฆฝ๋ ์ต์ ๊ฐ์ฒด๋ฅผ ์ด๊ธฐํํ๋ค.
initAndLoad(source): this
ํน์ ๋ถ๋ชจ์ ๋ง์ดํ
๋์ง ์์ ๋
๋ฆฝ๋ ์ต์
๊ฐ์ฒด๋ฅผ ์ด๊ธฐํํ๊ณ , source ๊ฐ์ฒด๋ก๋ถํฐ ์ต์
๊ฐ์ ์ฝ์ด์ ์ค์ ํ๋ค.
| Parameter | Type |
|---|---|
| source | any (opens in a new tab) |
invertOptions(source?): any (opens in a new tab)
source๋ฅผ updateOptions์ ์ ์ฉํ์ ๋ ๊ทธ ๋ณ๊ฒฝ์ ๋๋๋ฆฌ๋ ์ญ(inverse) update ํ์ด๋ก๋๋ฅผ
ํ์ฌ ์ํ ๊ธฐ์ค์ผ๋ก ๊ณ์ฐํด ๋ฐํํ๋ค. redo ์ ์ฉ ์ ์ ํธ์ถํด์ผ ํ๋ค(ํ์ฌ ๊ฐ์ด ๊ณง "before"๋ค).
command์ undo์ฉ ์ค๋
์ท์ ์ต์ ๋ธํ๋ก ๋ง๋ค๊ธฐ ์ํ ๊ฒ์ด๋ค:
const inverse = model.invertOptions(options);
model.updateOptions(options);
model.updateOptions(inverse);
ํค ์ข ๋ฅ๋ณ ์ฒ๋ฆฌ(๋คํ์ ์ผ๋ก ์์์ ์์):
- ์์ ๋ชจ๋ธ:
child.invertOptions(source[key])๋ก ์์ํ๋ค.RCollection์ ์ด๋ฅผ overrideํด ์ถ๊ฐ/์ญ์ /์ฌ์ ๋ ฌ๊น์ง ๋๋๋ฆฌ๋ ๊ตฌ์กฐ ์ญ๋ธํ๋ฅผ ๋ง๋ ๋ค. - ์ค์นผ๋ผ/์ธ๋ถ ํค: ํด๋น ํค์ ํ์ฌ ๊ฐ์ force ์ค๋
์ทํ๋ค(default์๋ ๊ฐ๋ ํฌํจํ๋ฏ๋ก undo๊ฐ
default๋ก ๋๋๋ฆด ์ ์๋ค).
source์ ๊ฐ ์์ฒด๋ ํค ์ ํ์๋ก๋ง ์ฐ์ด๊ณ ๋ฌด์๋๋ค.
source๊ฐ ์ผ๋ฐ ๊ฐ์ฒด๊ฐ ์๋๋ฉด(undefined/์์๊ฐ/๋ฐฐ์ด) base๋ก์ ๋๋๋ฆด ํค๊ฐ ์์ผ๋ฏ๋ก **no-op ์ญ({})**์
๋ฐํํ๋ค. ๋ฐฐ์ด source๋ _doSetSimple๋ก ์ํ๋ฅผ ํต์งธ ์ธํ
ํ๋ ์์ค๋ฅผ ์ค์ ๋ก ๋ค๋ฃจ๋ ํด๋์ค๋ ์ด
๋ฉ์๋๋ฅผ overrideํ๋ค(RCollection์ด ๊ทธ ์๋ก, ๋ฐฐ์ด/{items,updateMode} source์ ๊ตฌ์กฐ ์ญ๋ธํ๋ฅผ ๋ง๋ ๋ค).
| Parameter | Type |
|---|---|
| source | any (opens in a new tab) |
loadOptions(source, clear?): this
source ๊ฐ์ฒด๋ก๋ถํฐ ๋ชจ๋ธ ์ค์ ๊ฐ์ ์ฝ์ด์ ์ ์ฉํ๋ค.
[์ ์ฑ
] load๋ source์ ๋ช
์๋ ๊ฐ์ "์ฌ์ฉ์ ์๋"๋ก ๊ทธ๋๋ก ๋ณด์กดํ๋ค. ์ฆ source์ ๊ฐ์ด
ํ์ฌ defaults์ ๊ฐ๋๋ผ๋ _op์ ๊ทธ๋๋ก ๊ธฐ๋ก๋๋ค. ์ด๋ ๋จ์ํ ์ฑ๋ฅ ์ต์ ํ๊ฐ ์๋๋ผ
์๋ฏธ์ ์๋๋ ๋์์ด๋ค:
defaults๋ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ๋ฒ์ ์ ์ ๋ณ๊ฒฝ๋ ์ ์๋ค.- load ์์ ์ "defaults์ ๊ฐ๋ค"๋ ์ด์ ๋ก ํค๋ฅผ ๋ฒ๋ฆฌ๋ฉด, ์ดํ
defaults๊ฐ ๋ฐ๋์์ ๋ ์ ์ฅ๋ณธ์ด ํํํ๋ ๊ฐ์ด ์กฐ์ฉํ ๋ฌ๋ผ์ง๋ค. - ๊ทธ๋๋ก ๋ณด์กดํ๋ฉด ์ฌ์ฉ์๊ฐ ๋ช ์์ ์ผ๋ก ์ง์ ํ ๊ฐ์ด ํญ์ ์ฐ์ ํ๋ค.
์ง๋ ฌํ(saveOptions)๋ ์ด์ฐจํผ defaults์ ๊ฐ์ ๊ฐ์ ํํฐ๋งํ๋ฏ๋ก, ์ธ๋ถ์ ์ ์ฅ๋๋
๊ฒฐ๊ณผ์ ํฌ๊ธฐ์ ๋ด์ฉ์๋ ์ํฅ์ด ์๋ค. ์ถ๊ฐ ๋น์ฉ์ _op์ ์ฝ๊ฐ์ ๋ฉ๋ชจ๋ฆฌ๋ฟ์ด๋ค.
(๋ฉ๋ชจ๋ฆฌ ์ ๋ฆฌ๋ getOption()์ "์ฌ์ฉ์ ๋ช
์ ์ฌ๋ถ" ์๋ฏธ๊ฐ ํ์ํ ํน์ ์ผ์ด์ค์ ํํด์๋ง
clean()์ ๋ช
์์ ์ผ๋ก ํธ์ถํ๋ค.)
| Parameter | Type | Description |
|---|---|---|
| source | any (opens in a new tab) | |
| clear | boolean (opens in a new tab) | ๊ธฐ๋ณธ true. ์ ์ฉ ์ ์ ๊ธฐ์กด ์ค์ ์ ๋ชจ๋ ๋น์ด๋ค(์ฌ๊ท). ์ฆ source๋ ๋ชจ๋ธ ์ ์ฒด๋ฅผ ํํํ๋ ์์ ํ ์ต์
ํธ๋ฆฌ๋ก ๊ฐ์ฃผ๋์ด, source์ ์๋ ๊ธฐ์กด ๊ฐ์ ์ฌ๋ผ์ง๋ค(์ ์ฒด ๊ต์ฒด). false์ด๋ฉด ๋ถ๋ถ reload๊ฐ ๋๋ค: ๊ธฐ์กด ์ค์ ์ ๋น์ฐ์ง ์๊ณ source์ ํฌํจ๋ ํค๋ง load ์๋ฏธ๋ก ๋ค์ ์ ์ฉํ๊ณ , ๋น ์ง ํค๋ ๊ทธ๋๋ก ๋ณด์กดํ๋ค. ํน์ ํ์ ํธ๋ฆฌ๋ง ํต์งธ๋ก ๊ฐ์๋ผ์ธ ๋ ์ ์ฉํ๋ค. |
[updateOptions์์ ์ฐจ์ด] clear=false๋ "ํฌํจ๋ ํค๋ง ์ ์ฉ"์ด์ง๋ง ์๋ฏธ๊ฐ ๋ค๋ฅด๋ค.
updateOptions: ๊ฐ์ด ํ์ฌ effective ๊ฐ๊ณผ ๊ฐ์ผ๋ฉด ๊ฑด๋๋ฐ๊ณ , ๊ฐ์ฒด ๊ฐ์ ๋ถ๋ถ ๋ณํฉํ๋ค.loadOptions(source, false): ํฌํจ๋ ํค๋ load ์๋ฏธ๋ก ์ ์ฉํ๋ค. ์ฆ defaults์ ๊ฐ์๋_op์ ๊ทธ๋๋ก ๊ธฐ๋กํ๊ณ , ๊ฐ์ฒด/์์ ๊ฐ์ ๋ถ๋ถ ๋ณํฉ์ด ์๋๋ผ ํต์งธ ๊ต์ฒดํ๋ค.
num(prop): number (opens in a new tab)
์ซ์ ํ์
์ ์ต์
๊ฐ์ ํนํ๋ prop() ๋ฉ์๋. prop()๊ณผ ๋ฌ๋ฆฌ ์ซ์๋ก ๋ณํํด์ ๋ฐํํ๋ค.
ํด์ ์์๋ prop()๊ณผ ๋์ผํ๋ค(๋ช
์๊ฐ(_op) โ preset โ ํด๋์ค defaults).
| Parameter | Type | Description |
|---|---|---|
| prop | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
returnย ์ซ์ ํ์
์ ์ต์
๊ฐ. ์ด๋์์๋ ์ซ์๋ฅผ ์ป์ง ๋ชปํ๋ฉด NaN.
numAt(path): number (opens in a new tab)
์ (dot) ํ๊ธฐ๋ฒ์ผ๋ก ๊ฒฝ๋ก๋ฅผ ์ง์ ํด์ ์ซ์ ํ์
์ ์ต์
๊ฐ์ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| path | string (opens in a new tab) | ๊ฒฝ๋ก ๋ฌธ์์ด |
returnย ๊ฒฝ๋ก์ ํด๋นํ๋ ์ซ์ ํ์
์ ์ต์
๊ฐ ๋๋ NaN
preset(preset, recursive?): this
์ด ์ธ์คํด์ค์ preset(๊ทธ๋ฃน/๊ณต์ ๊ธฐ๋ณธ๊ฐ)์ ์ค์ ํ๋ค.
preset์ด ์ค์ ๋๋ฉด prop/num/bool/props ๋ฑ ํจ๊ณผ ๊ฐ ์กฐํ ์
์ด ์ธ์คํด์ค์ ๋ช
์๋์ง ์์ ์ต์
์ ํด๋์ค defaults๋ณด๋ค ๋จผ์ preset์์ ๊ฐ์ ธ์จ๋ค
(ํด์ ์์: _op โ preset โ defaults).
preset์ ๋์ผ ํด๋์ค์ ์ธ์คํด์ค๋ฅผ ์ ์ ํ๋ค(๋ฐ๋ผ์ defaults๊ฐ ๋์ผํ๋ฏ๋ก preset์
๋ช
์๊ฐ delta๋ง ์ฐธ์กฐํด๋ ์ถฉ๋ถํ๋ค). ๋ด๋ถ์ ์ผ๋ก preset._op(๋ช
์๊ฐ delta)๋ฅผ ๋ผ์ด๋ธ๋ก
์ฐธ์กฐํ๋ฏ๋ก ์๋ณธ preset์ ์ดํ ๋ณ๊ฒฝ์ด ์ ํ๋๋ค. ์ง๋ ฌํ(saveOptions)์ minimal-delta ๊ธฐ์ค์
์ฌ์ ํ ํด๋์ค defaults์ด๋ฉฐ preset์ ์ฝ๊ธฐ ์ ์ฉ ์ค๋ฒ๋ ์ด๋ก๋ง ์์ฉํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| preset | ROptionable<PivotRowHeaderOptions> | ์ด ์ธ์คํด์ค๊ฐ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ์์ํ ๋์ผ ํด๋์ค ์ต์ ๋ชจ๋ธ |
| recursive | boolean (opens in a new tab) | true์ด๋ฉด ์์ ๋ชจ๋ธ๊น์ง ์ฌ๊ท์ ์ผ๋ก preset์ ์ค์ ํ๋ค. ๊ธฐ๋ณธ๊ฐ true |
prop(prop): PivotRowHeaderOptions\[K]
์ต์
์ ํจ๊ณผ ๊ฐ(effective value)์ ๋ฐํํ๋ค.
ํด์ ์์๋ ๋ช
์๊ฐ(_op) โ preset โ ํด๋์ค defaults์ด๋ค. ์ด ์ธ์คํด์ค์ ๋ช
์์ ์ผ๋ก ์ค์ ๋
๊ฐ์ด ์์ผ๋ฉด ๊ทธ ๊ฐ์, ์๊ณ preset์ด ์ค์ ๋ผ ์์ผ๋ฉด preset์ ๋ช
์๊ฐ์, ๊ทธ๊ฒ๋ ์์ผ๋ฉด
ํด๋์ค defaults์ ๊ธฐ๋ณธ๊ฐ์ ๋ฐํํ๋ค.
์ต์
๊ฐ์ ์ฝ์ ๋๋ options.prop ์ง์ ์ ๊ทผ ๋์ ์ด ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
propAt(path): any (opens in a new tab)
์ (dot) ํ๊ธฐ๋ฒ์ผ๋ก ๊ฒฝ๋ก๋ฅผ ์ง์ ํด์ ์ต์
์ ํจ๊ณผ ๊ฐ(effective value)์ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| path | string (opens in a new tab) | ๊ฒฝ๋ก ๋ฌธ์์ด |
returnย ๊ฒฝ๋ก์ ํด๋นํ๋ ์ต์
๊ฐ ๋๋ undefined
propIs(prop, value): boolean (opens in a new tab)
์ต์
๊ฐ์ด ํน์ ๊ฐ๊ณผ ์ผ์นํ๋์ง ์ฌ๋ถ๋ฅผ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | keyof PivotRowHeaderOptions | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
| value | any (opens in a new tab) | ๋น๊ตํ ๊ฐ |
returnย ์ผ์น ์ฌ๋ถ
propIsNot(prop, value): boolean (opens in a new tab)
์ต์
๊ฐ์ด ํน์ ๊ฐ๊ณผ ์ผ์นํ์ง ์๋์ง ์ฌ๋ถ๋ฅผ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | keyof PivotRowHeaderOptions | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
| value | any (opens in a new tab) | ๋น๊ตํ ๊ฐ |
returnย ๋ถ์ผ์น ์ฌ๋ถ
props(props): Pick (opens in a new tab)<OP, K>
์ง์ ํ ์ต์
๋ค์ ํจ๊ณผ ๊ฐ(effective value)์ ๋ฌถ์ด์ ๋ฐํํ๋ค.
์ฌ๋ฌ ์ต์
์ destructuring์ผ๋ก ํ๊บผ๋ฒ์ ์ฝ์ ๋ ์ฌ์ฉํ๋ค.
๊ฐ ํญ๋ชฉ์ ํด์ ์์๋ prop()๊ณผ ๋์ผํ๋ค(๋ช
์๊ฐ(_op) โ preset โ ํด๋์ค defaults).
const { color, radius } = this.props('color', 'radius');| Parameter | Type | Description |
|---|---|---|
| props | Array (opens in a new tab)<> | ์ค์ ํญ๋ชฉ ์ด๋ฆ๋ค |
removeOption(prop, render?): this
๋ช
์์ ์ผ๋ก ์ค์ ๋ ๋ชจ๋ธ ์ค์ ๊ฐ์ ์ ๊ฑฐํด์ ๋ชจ๋ธ์ ๊ธฐ๋ณธ ๊ฐ์ด ์ ์ฉ๋๋๋ก ํ๋ค.
prop์ด ์์ ๋ชจ๋ธ ์ด๋ฆ์ธ ๊ฒฝ์ฐ์๋ ํด๋น ์์์ clearOptions(true)๋ฅผ ํธ์ถํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | keyof PivotRowHeaderOptions | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
| render | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด ์ต์ ๋ณ๊ฒฝ ์ ์ปจํธ๋กค์ ๋ค์ ๊ทธ๋ฆฐ๋ค. ๊ธฐ๋ณธ๊ฐ true |
returnย ๋ชจ๋ธ ๊ฐ์ฒด ์์
saveOption(prop): PivotRowHeaderOptions[K]{ autoWidth: any;autoWidthMode: any;columnResizable: any;columnWidth: any;dimensionClickAction: any;expanderVisible: any;fallbackSortScope: any;hideSingleMeasure: any;indent: any;initCollapsed: any;layout: any;maxColumnWidth: any;measureClickAction: any;minColumnWidth: any;style: any;visible: any; }
์ต์
๊ฐ์ ์ฝ๋๋ค.
prop()๊ณผ ๋ฌ๋ฆฌ ํจ๊ณผ ๊ฐ์ด ์๋ ๋ช
์์ ์ผ๋ก ์ค์ ๋ ๊ฐ๋ง ์ฝ๋๋ค. ์ค์ ๋์ง ์์ ์ต์
์ undefined๋ฅผ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
returnย ๋ช
์์ ์ผ๋ก ์ค์ ๋ ๊ฐ ๋๋ undefined
saveOptions(props?, recursive?, includeDefs?, force?): Partial (opens in a new tab)<OP>
๋ชจ๋ธ์ ์ค์ ๊ฐ์ json ๊ฐ์ฒด๋ก ์ง๋ ฌํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| props | Array<keyof PivotRowHeaderOptions>{ autoWidth: any;autoWidthMode: any;columnResizable: any;columnWidth: any;dimensionClickAction: any;expanderVisible: any;fallbackSortScope: any;hideSingleMeasure: any;indent: any;initCollapsed: any;layout: any;maxColumnWidth: any;measureClickAction: any;minColumnWidth: any;style: any;visible: any; } | ์ ์ฅํ ์์ฑ ํํฐ.
|
| recursive | boolean (opens in a new tab) | ์์ ๋ชจ๋ธ๊น์ง ์ฌ๊ท ์ ์ฅ ์ฌ๋ถ. |
| includeDefs | boolean (opens in a new tab) | ๊ธฐ๋ณธ๊ฐ๊ณผ ๋์ผํ ๊ฐ๋ ์ ์ฅ ์ฌ๋ถ. |
| force | boolean (opens in a new tab) | true์ด๋ฉด props๋ก ๋ช
์๋ ์์ฑ์ _op๋ defaults์ ๊ฐ์ด ์๋๋ผ๋ ๊ฒฐ๊ณผ์ ํฌํจ๋๋ค (์ผ๋ฐ ์ต์
์ undefined, ๋ช
์๋ ์์์ ๋น {}์ด๋ผ๋ ํฌํจ). props๊ฐ ์์ ๋๋ ๋ฌด์๋๋ค. |
saveTo(target, props?, recursive?, includeDefs?, force?): Partial (opens in a new tab)<OP>
๋ชจ๋ธ์ ์ค์ ๊ฐ์ target ๊ฐ์ฒด์ ๋ณต์ฌํด์ ์ ์ฅํ๋ค.
| Parameter | Type |
|---|---|
| target | Partial (opens in a new tab)<OP> |
| props | Array<keyof PivotRowHeaderOptions>{ autoWidth: any;autoWidthMode: any;columnResizable: any;columnWidth: any;dimensionClickAction: any;expanderVisible: any;fallbackSortScope: any;hideSingleMeasure: any;indent: any;initCollapsed: any;layout: any;maxColumnWidth: any;measureClickAction: any;minColumnWidth: any;style: any;visible: any; } |
| recursive | boolean (opens in a new tab) |
| includeDefs | boolean (opens in a new tab) |
| force | boolean (opens in a new tab) |
setColumnWidth(col, width): void (opens in a new tab)
์ปฌ๋ผ i์ ์ฌ์ฉ์ ๋๋น๋ฅผ ์ง์ ํ๋ค. null์ ์ ๋ฌํ๋ฉด ์ฌ์ฉ์ ์ง์ ํญ๋ชฉ์ ์ ๊ฑฐํ๋ค.
์๋ ๊ณ์ฐ ๊ฒฐ๊ณผ๋ณด๋ค ์ฐ์ ํ๋ค.
| Parameter | Type |
|---|---|
| col | number (opens in a new tab) |
| width | number (opens in a new tab) |
setComputedColumnWidth(col, width): void (opens in a new tab)
์ปฌ๋ผ i์ ์๋ ๊ณ์ฐ๋ ๋๋น๋ฅผ ๋ณด๊ดํ๋ค. (๋ณดํต view ์ธก ์ธก์ ๋จ๊ณ์์ ํธ์ถ)
์ฌ์ฉ์๊ฐ ๋ช
์ํ ๋๋น๊ฐ ์์ผ๋ฉด ๋ฌด์๋๋ค.
| Parameter | Type |
|---|---|
| col | number (opens in a new tab) |
| width | number (opens in a new tab) |
str(prop): string (opens in a new tab)
๋ฌธ์์ด ํ์
์ ์ต์
๊ฐ์ ํนํ๋ prop() ๋ฉ์๋. prop()๊ณผ ๋ฌ๋ฆฌ ๋ฌธ์์ด๋ก ๋ณํํด์ ๋ฐํํ๋ค.
ํด์ ์์๋ prop()๊ณผ ๋์ผํ๋ค(๋ช
์๊ฐ(_op) โ preset โ ํด๋์ค defaults).
์ด๋์์๋ ๊ฐ์ ์ป์ง ๋ชปํ๋ฉด String(undefined) ์ฆ "undefined" ๋ฌธ์์ด์ด ๋ฐํ๋๋ฉฐ,
๊ฐ์ด null์ด๋ฉด "null"์ด ๋๋ค. ๋ฏธ์ค์ ์ ๊ธฐ๋ณธ๊ฐ์ด ํ์ํ๋ฉด strDef๋ฅผ ์ฌ์ฉํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
returnย ๋ฌธ์์ด๋ก ๋ณํํ ์ต์
๊ฐ
strAt(path): string (opens in a new tab)
์ (dot) ํ๊ธฐ๋ฒ์ผ๋ก ๊ฒฝ๋ก๋ฅผ ์ง์ ํด์ ๋ฌธ์์ด ํ์
์ ์ต์
๊ฐ์ ๋ฐํํ๋ค.
ํด์์ str๊ณผ ๋์ผํ๋ฉฐ, ๊ฒฝ๋ก๊ฐ ์ ํจํ์ง ์์ผ๋ฉด undefined๋ฅผ ๋ฐํํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| path | string (opens in a new tab) | ๊ฒฝ๋ก ๋ฌธ์์ด |
returnย ๊ฒฝ๋ก์ ํด๋นํ๋ ๋ฌธ์์ด ์ต์
๊ฐ ๋๋ undefined
toggleAt(path, render?): any (opens in a new tab)
boolean (opens in a new tab) ํ์
์ ๋ชจ๋ธ ์ค์ ๊ฐ์ ๋ฐ๋ ๊ฐ์ผ๋ก ๋ณ๊ฒฝํ๋ค.
path ๋งค๊ฐ๋ณ์๋ ํ์ ๋ชจ๋ธ์ ์์ฑ ์ด๋ฆ์ ์ (.)์ผ๋ก ๊ตฌ๋ถํด์ ์ง์ ํ๋ค.
์๋ฅผ ๋ค์ด, "axis.x"๋ axis ๋ชจ๋ธ์ x ์์ฑ์ ์๋ฏธํ๋ค.
render์ force ๋งค๊ฐ๋ณ์๋ toggleOption๊ณผ ๋์ผํ๋ค.
| Parameter | Type |
|---|---|
| path | string (opens in a new tab) |
| render | boolean (opens in a new tab) |
toggleOption(prop, render?): this
boolean (opens in a new tab) ํ์
์ ๋ชจ๋ธ ์ค์ ๊ฐ์ ๋ฐ๋ ๊ฐ์ผ๋ก ๋ณ๊ฒฝํ๋ค.
prop์ด ์์ ๋ชจ๋ธ ์ด๋ฆ์ธ ๊ฒฝ์ฐ์๋ ์๋ฌด๊ฒ๋ ํ์ง ์๊ณ ๋ฌด์๋๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | keyof PivotRowHeaderOptions | ์ค์ ํญ๋ชฉ ์ด๋ฆ |
| render | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด ์ต์ ๋ณ๊ฒฝ ์ ์ปจํธ๋กค์ ๋ค์ ๊ทธ๋ฆฐ๋ค. ๊ธฐ๋ณธ๊ฐ true |
returnย ๋ชจ๋ธ ๊ฐ์ฒด ์์
updateAt(path, value, render?, force?): any (opens in a new tab)
ํ์ ๋ชจ๋ธ์ ์ค์ ๊ฐ์ ๋ณ๊ฒฝํ๋ค.
path ๋งค๊ฐ๋ณ์๋ ํ์ ๋ชจ๋ธ์ ์์ฑ ์ด๋ฆ์ ์ (.)์ผ๋ก ๊ตฌ๋ถํด์ ์ง์ ํ๋ค.
์๋ฅผ ๋ค์ด, "axis.x"๋ axis ๋ชจ๋ธ์ x ์์ฑ์ ์๋ฏธํ๋ค.
render์ force ๋งค๊ฐ๋ณ์๋ updateOption๊ณผ ๋์ผํ๋ค.
| Parameter | Type |
|---|---|
| path | string (opens in a new tab) |
| value | any (opens in a new tab) |
| render | boolean (opens in a new tab) |
| force | boolean (opens in a new tab) |
updateOption(prop, value, render?, force?): this
ํ๋์ ์์ฑ ๊ฐ์ ์ค์ ํ๋ค.
์ฌ๋ฌ ์์ฑ๋ค์ ํ๊บผ๋ฒ์ ๋ณ๊ฒฝํ ๋๋ updateOptions๋ฅผ ์ฌ์ฉํ๋ค.
๊ธฐ๋ณธ์ ์ผ๋ก ์ด์ ๊ฐ๊ณผ ๋ค๋ฅธ ๊ฒฝ์ฐ์๋ง ์ ์ฉ๋๋ค.
ํนํ, ์์ฑ๊ฐ์ด ๊ฐ์ฒด์ธ ๊ฒฝ์ฐ ๊ฐ์ฒด ์์ฑ๋ง ๋ฐ๋ ๊ฒฝ์ฐ ์ ์ฉ๋์ง ์๋๋ค.
๋ฐ๊พธ๊ณ ์ถ๋ค๋ฉด force ๋งค๊ฐ๋ณ์๋ฅผ true๋ก ์ง์ ํด์ ํธ์ถํ๋ค.
๋, prop ๋งค๊ฐ๋ณ์๊ฐ ํ์ ๋ชจ๋ธ ์ด๋ฆ์ธ ๊ฒฝ์ฐ ํ์ ๋ชจ๋ธ์ updateOptions๋ฅผ ํธ์ถํ ๊ฒ๊ณผ ๋์ผํ๋ค.
| Parameter | Type | Description |
|---|---|---|
| prop | ์ค์ ํญ๋ชฉ ์ด๋ฆ | |
| value | PivotRowHeaderOptions\[K] | ์ค์ ๊ฐ |
| render | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด ์ต์ ๋ณ๊ฒฝ ์ ์ปจํธ๋กค์ ๋ค์ ๊ทธ๋ฆฐ๋ค. ๊ธฐ๋ณธ๊ฐ: true |
| force | boolean (opens in a new tab) | ์ง์ ํ ๊ฐ์ด ์ด์ ๊ฐ๊ณผ ๋์ผํ ๊ฒฝ์ฐ์๋ ์ ์ฉํ๋ค. ๊ธฐ๋ณธ๊ฐ: false |
returnย ๋ชจ๋ธ ๊ฐ์ฒด ์์
updateOptions(source?, render?): this
๋ชจ๋ธ ์ค์ ๊ฐ๋ค์ ๋ณ๊ฒฝํ๋ค.
source์ ์์ ๋ชจ๋ธ ์ด๋ฆ์ ํค๊ฐ ํฌํจ๋๋ฉด ํด๋น ๊ฐ์ ์์ ๋ชจ๋ธ์ updateOptions์ ์์๋๋ค.
| Parameter | Type | Description |
|---|---|---|
| source | Partial (opens in a new tab)<OP> | ์ค์ ์ต์ ๋ค์ด ํฌํจ๋ json ๊ฐ์ฒด |
| render | boolean (opens in a new tab) | true๋ก ์ง์ ํ๋ฉด ์ต์ ๋ณ๊ฒฝ ์ ์ปจํธ๋กค์ ๋ค์ ๊ทธ๋ฆฐ๋ค. ๊ธฐ๋ณธ๊ฐ true |
returnย ๋ชจ๋ธ ๊ฐ์ฒด ์์