Chart properties.

From simple attributes to structured data, responsive sizing, and logos.

Shared sy-chart API versus direct tags

#

Individual chart guides use sy-line-chart·sy-sankey and other direct tags with their specific APIs. The shared facade sy-chart: type selects the chart type and provides type switching, a shared menu, a data table, and export.

Pass basic input through type·series·values·data. Specialized option names and types may differ from direct tags, so check the mapping below and the shared API. Logo properties brandLogo·brandPosition use the same names.

Key shared properties

PropertyType / Default
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

The export menu retains its built-in items, and contextMenuItems adds custom items. For all properties, events, and methods, see Shared API reference; for logo settings, see Logos and positioning.

Option mapping between direct tags and facade

chartDirect tagsy-chart
Line·Area·Column·Barseries / values / xAxis / yAxisSame name
Pie·Item·Word Cloudvaluesvalues
Most Pro chartsdatadata
IcicledirectionicicleDirection
DendrogramdirectiondendrogramDirection
Flow LinesroutePathflowLinesPath
Theme Riveroffset / orderthemeRiverOffset / themeRiverOrder
Scatter 3Dmarkerscatter3dMarker
Wafer MaporientationwaferOrientation
LogobrandLogo / brandPositionSame name

The table above lists common mappings. Before copying direct-tag options to the facade, check Shared API for the correct names and types.

<sy-chart id="hierarchy" type="icicle" brand-position="bottom-left"></sy-chart>
<script type="module">
  // Register sy-chart and sy-icicle from the Pro package and register a license first.
  await customElements.whenDefined('sy-chart');
  const chart = document.querySelector('#hierarchy');
  chart.icicleDirection = 'left-right';
  chart.data = [{ id: 'all', label: 'All', children: [
    { id: 'a', label: 'A', value: 60 },
    { id: 'b', label: 'B', value: 40 }
  ] }];
</script>