Chart properties.

단순한 attribute부터 구조화된 데이터, 반응형 크기와 로고까지.

공통 sy-chart API와 직접 태그의 차이

#

개별 차트 문서는 sy-line-chart·sy-sankey 같은 직접 태그의 고유 API를 사용합니다. 공통 파사드 sy-chart는 type으로 차트 종류를 선택하고, 유형 전환·공통 메뉴·데이터 표·내보내기를 제공합니다.

기본 입력은 type·series·values·data로 전달합니다. 특화 옵션의 이름과 타입은 직접 태그와 다를 수 있으므로 아래 매핑과 공통 API를 확인하세요. 로고의 brandLogo·brandPosition은 같은 이름을 사용합니다.

주요 공통 속성

속성타입 / 기본값
typeChartType'line'
brand-logostringundefined
brand-position'top-left' | 'top-right' | 'bottom-left' | 'bottom-right''bottom-right'
seriesLineChartSeries[] | ScatterChartSeries[]undefined
valuesLineChartValues | ScatterChartValuesnew Float32Array(0)
engineLineChartEngineMode'auto'
dataRadarChartData | FunnelChartData | ReadonlyArray<DumbbellDatum> | ReadonlyArray<DotPlotDatum> | ReadonlyArray<TornadoDatum> | ReadonlyArray<VariwideDatum> | ChordData | NetworkGraphData | TreemapData | SankeyData | ErrorBarData | WaterfallData | BubbleData | BoxPlotData | CandlestickData | CalendarHeatmapData | SpectrogramInput | DensityMapInput | HeatmapData | SunburstData | IcicleData | GanttData | ParallelCoordinatesData | DendrogramData | GeoMapData | Surface3DData | Scatter3DData | FlowLinesData | ThemeRiverData | Bar3DDataundefined
contextmenubooleanfalse
context-menu-itemsChartMenuItem[]undefined
themeChartThemeName | ChartThemeundefined

내보내기 메뉴의 기본 항목은 유지되며, contextMenuItems는 사용자 항목을 추가합니다. 전체 속성·이벤트·메서드는 공통 API reference, 로고 설정은 로고와 위치에서 확인하세요.

직접 태그와 파사드의 옵션 매핑

차트직접 태그sy-chart
Line·Area·Column·Barseries / values / xAxis / yAxis같은 이름
Pie·Item·Word Cloudvaluesvalues
대부분의 Pro 차트datadata
IcicledirectionicicleDirection
DendrogramdirectiondendrogramDirection
Flow LinesroutePathflowLinesPath
Theme Riveroffset / orderthemeRiverOffset / themeRiverOrder
Scatter 3Dmarkerscatter3dMarker
Wafer MaporientationwaferOrientation
로고brandLogo / brandPosition같은 이름

위 표는 자주 사용하는 매핑입니다. 직접 태그의 옵션을 파사드에 그대로 복사하기 전에 공통 API에서 이름과 타입을 확인하세요.

<sy-chart id="hierarchy" type="icicle" brand-position="bottom-left"></sy-chart>
<script type="module">
  // Pro 패키지의 sy-chart와 sy-icicle을 등록하고 라이선스를 연결한 뒤 실행합니다.
  await customElements.whenDefined('sy-chart');
  const chart = document.querySelector('#hierarchy');
  chart.icicleDirection = 'left-right';
  chart.data = [{ id: 'all', label: '전체', children: [
    { id: 'a', label: 'A', value: 60 },
    { id: 'b', label: 'B', value: 40 }
  ] }];
</script>