RealGrid2 API
Interface
ShapeCellRenderer

ShapeCellRenderer

그리드에 포함되어 있는 도형을 표시하는 렌더러

Signature:

export interface ShapeCellRenderer extends CellRenderer 

Extends: CellRenderer

Remarks

자동 높이에서 TOP_EDGE, BOTTOM_EDGE를 사용할 수 없다..

[상위 클래스]

CellRenderer

Example

// string type
column.renderer = 'shape';
 
// object type
column.renderer = {
    "type": "shape",
    "shape": "diamond"
}

Events

PropertyModifiersTypeDescription
shapeCallbackGetShapeCallback도형의 종류를 지정하기 위한 콜백

Properties

PropertyModifiersTypeDescription
shapestring도형 종류
shapeHeightnumber도형의 높이
shapeLocationIconLocation도형의 위치
shapeMap{ [cellValue: string]: PolygonShape; }셀 값 - 도형 종류 쌍
shapeStylestring도형의 스타일 클래스 명
shapeWidthnumber도형의 너비
type'shape'종류: 도형

Events Desc

shapeCallback

도형의 종류를 지정하기 위한 콜백

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

도형 종류

Remarks:

PolygonShape 에 있는 도형들을 설정할 수 있다.

원 모양을 설정하고 싶다면, 'ellipse'로 설정하면 된다.

shapeshapeCallback 이 지정되지 않은 경우 적용된다.

shapeHeight

도형의 높이

shapeLocation

도형의 위치

shapeMap

셀 값 - 도형 종류 쌍

Remarks:

shape 보다 우선 적용된다.

shapeCallback 이 지정되지 않은 경우 적용된다.

Example:

 
let sMap = {
     "value1": "triangle",
     "value2": "diamond"
}
 
column.renderer = {
    "type": "shape",
    "shapeMap": sMap
}

shapeStyle

도형의 스타일 클래스 명

shapeWidth

도형의 너비

type

종류: 도형