rMate 속성 정리

개발 오답 노트·2025년 8월 17일
post-thumbnail

rMate Chart에서 Waterfall, Treemap, Bar 차트에서 자주 쓰이는 속성(legend, series, displayName, nameField, weightField, xField, yField)의 의미


📌 1. legend

  • 범례(legend) 영역을 표시할지 여부 및 속성 정의.
  • 보통 차트 종류(series)나 데이터 항목 구분을 설명하는 부분.
  • 예: legendDirection, legendLabelPlacement, useVisibleCheck 등 세부 옵션 존재.

📌 2. series

  • 차트에 표시되는 데이터 계열(Series) 정의.
  • BarSeries, WaterfallSeries, TreeMapSeries 등 차트 종류에 맞는 series를 지정해야 함.
  • series 내부에 xField, yField, displayName 같은 속성이 포함됨.

📌 3. displayName

  • 범례(legend) 또는 툴팁(toolTip) 에 표시될 이름.
  • 데이터셋의 필드명이 그대로 나오지 않게, 사람이 읽기 좋은 이름으로 표시할 때 사용.
<BarSeries yField="sales" displayName="매출액"/>

📌 4. nameField

  • TreemapSeries 전용 속성.
  • 각 사각형(타일)에 표시될 이름을 지정.
  • 예를 들어 부서명, 카테고리명 등.
<TreeMapSeries nameField="deptName" weightField="sales"/>

📌 5. weightField

  • TreemapSeries 전용 속성.
  • 사각형의 크기를 결정하는 기준값.
  • 값이 클수록 넓은 영역을 차지.
<TreeMapSeries nameField="deptName" weightField="sales"/>

📌 6. xField / yField

  • Bar, Column, Waterfall 등 좌표형 차트에서 축 데이터 지정.
  • xField : X축에 해당하는 값 (보통 카테고리/분류, 예: 월, 제품명 등)
  • yField : Y축에 해당하는 값 (보통 수치형 데이터, 예: 매출액, 건수 등)
<BarSeries xField="month" yField="sales"/>
<WaterfallSeries xField="step" yField="amount"/>

📊 차트별 정리

차트종류주요 필드설명
WaterfallxField, yField, displayNameX축 단계별 값, Y축 증감 값, 범례 표시 이름
TreemapnameField, weightField, displayName사각형 타일 이름, 크기 비율, 범례 이름
BarxField, yField, displayNameX축 카테고리, Y축 값, 범례 이름

👉 정리

  • legend = 범례 표시 여부/설정
  • series = 어떤 데이터 계열(차트 종류) 쓸지
  • displayName = 범례/툴팁에 표시되는 이름
  • nameField = Treemap에서 각 사각형 이름
  • weightField = Treemap에서 크기 기준값
  • xField, yField = 좌표형 차트에서 축 데이터
profile
포토폴리오 https://wikidocs.net/book/10969 유튜브 링크 https://www.youtube.com/@%EC%B5%9C%EC%9B%90%EC%9D%BC-n5r

0개의 댓글