설정
개요

설정 개요

RealPivot2 피벗북(Pivot Book)은 PivotBookConfiguration 타입의 JSON (opens in a new tab) 객체로 설정하여, 피봇 컨트롤 생성 시 전달한다.

const config: PivotBookConfiguration = {
  tables: [{ 
    name: 'sheet1', 
    title: '매출 분석',
    fields: {
      rows: [ '차종', '브랜드명', ],
      columns: [ '판매분기', '판매월' ],
      values: [
        { name: '판매수량', dataBar: true, },
        '차량가격', 
      ]
    }
  }],
    ...
}
const book = createControl(document, 'control', cm, config);

야래 페이지들을 참조한다.

주요 구성 요소들은 다음과 같다.

Book Header

피벗북 상단 헤더 영역으로 메뉴바, layout바 등을 표시한다.
옵션 설정 모델은 PivotBookHeaderOptions이다.

const config = {
  header: {
    menuBar: {},
    layoutBar: {},
    ...
  } 
}

피벗북 개요 페이지를 참조한다.

Book Footer

북 하단 영역으로 페이지 전환 탭바와 현재 작업 중인 피벗테이블 정보 등을 표시한다.
옵션 설정 모델은 PivotBookFooterOptions이다.

const config = {
  fooer: {
    tabBar: {},
    ...
  } 
}

피벗북 개요 페이지를 참조한다.

Inspector

피봇 테이블의 필드 구성 패널, 필터 패널 등을 표시한다.
옵션 설정 모델은 PivotInspectorOptions이다.

const config = {
  inspector: {
    fieldPanel: {},
    filterPanel: {},
    position: 'floating',
    ...
  } 
}

Explorer

선택된 셀/영역의 상세 데이터를 grid/chart/map 패널로 보여주는 탐색기 뷰들을 표시한다.
옵션 설정 모델은 PivotExplorerOptions이다.

const config = {
  explorer: {
    detailPanel: {},
    chartPanel: {},
    mapPanel: {},
    ...
  } 
}

Tables

피봇북에 표시될 테이블 페이지들을 구성한다.
각 페이지는 필드 목록, 정렬, 필터 설정 및 소계, 시리즈 등의 설정들을 포함하며, 각 필드는 표시 형식, 방식, 오버레이 등을 설정한다. 즉, 피봇북의 데이터 표시에 대한 설정 정보를 모두 포함한다.
각 페이지의 설정 모델은 PivotBookPageOptions이다.
[주의] 설정 이름이 pages가 아니라 `tables' 이다.

const config = {
  tables: {
    fields: {},
    columnTotal: {},
    rowTotal: {},
    ...
  } 
}