ShapeCellRenderer
그리드에 포함되어 있는 도형을 표시하는 렌더러
Signature:
export interface ShapeCellRenderer extends CellRenderer Extends: CellRenderer
Remarks
자동 높이에서 TOP_EDGE, BOTTOM_EDGE를 사용할 수 없다..
[상위 클래스]
Example
// string type
column.renderer = 'shape';
// object type
column.renderer = {
"type": "shape",
"shape": "diamond"
}Events
| Property | Type | Description |
|---|---|---|
| shapeCallback | GetShapeCallback | 도형의 종류를 지정하기 위한 콜백 |
Properties
| Property | Type | Description |
|---|---|---|
| shape | string | 도형 종류 |
| shapeHeight | number | 도형의 높이 |
| shapeLocation | IconLocation | 도형의 위치 |
| shapeMap | { [cellValue: string]: PolygonShape; } | 셀 값 - 도형 종류 쌍 |
| shapeStyle | string | 도형의 스타일 클래스 명 |
| shapeWidth | number | 도형의 너비 |
| type | 'shape' | 종류: 도형 |
Events Desc
shapeCallback
도형의 종류를 지정하기 위한 콜백
Type - GetShapeCallback
Remarks:
GetShapeCallback 의 형식을 따른다.
Example:
const f = function(grid, model) {
if (model.value) {
return 'ellipse';
}
else {
return 'minus';
}
}
column.renderer = {
type: 'shape',
shapeCallback: f
}Properties Desc
shape
도형 종류
Type - string
Remarks:
PolygonShape 에 있는 도형들을 설정할 수 있다.
원 모양을 설정하고 싶다면, 'ellipse'로 설정하면 된다.
shape 나 shapeCallback 이 지정되지 않은 경우 적용된다.
shapeHeight
도형의 높이
Type - number
shapeLocation
도형의 위치
Type - IconLocation
shapeMap
셀 값 - 도형 종류 쌍
Type - { [cellValue: string]: PolygonShape; }
Remarks:
shape 보다 우선 적용된다.
shapeCallback 이 지정되지 않은 경우 적용된다.
Example:
let sMap = {
"value1": "triangle",
"value2": "diamond"
}
column.renderer = {
"type": "shape",
"shapeMap": sMap
}shapeStyle
도형의 스타일 클래스 명
Type - string
shapeWidth
도형의 너비
Type - number
type
종류: 도형
Type - 'shape'