Polar.

COMMUNITY

Arrange directions or cycles in polar coordinates.

Live preview20 feature examples

LIVE EXAMPLE

Measurements by direction

Match the page theme
Interact with the chart to see selection and range-change results here.
OptionsChanges are reflected in the preview and code.
Appearance and style8
Legend and interaction12
Title and dimensions3

Show the value for each direction as a radial bar. All values are sample data.

View code
Current preview
<div id="chart-container" style="width: 100%; min-width: 0;"></div>

<script type="module">
  import { defineCustomElement as define0 } from '@syidax/advanced/components/sy-polar-chart.js';
  define0();

  const specs = [
    {
      "id": "example-chart",
      "tag": "sy-polar-chart",
      "props": {
        "engine": "standard",
        "data": [45, 70, 55, 35, 65, 80, 50, 40],
        "categories": ["N", "NE", "E", "SE", "S", "SW", "W", "NW"],
        "variant": "rose",
        "width": 640,
        "height": 360,
        "brandPosition": "bottom-right",
        "brandLogo": ""
      }
    }
  ];
  const container = document.querySelector('#chart-container');
  const elements = specs.map(({ tag, id, props }) => {
    const element = document.createElement(tag);
    element.id = id;
    Object.assign(element, props);
    element.setAttribute('aria-label', 'polar example chart');
    return element;
  });
  container.replaceChildren(...elements);
  const chart = elements.at(-1);
  const onEvent = event => {
    console.log('pointClick', event.detail);
  };
  chart.addEventListener('pointClick', onEvent);
  const observer = new ResizeObserver(([entry]) => {
    const width = Math.max(160, Math.floor(entry.contentRect.width));
    elements.forEach(element => { element.width = width; });
  });
  observer.observe(container);

  // In an SPA, call this function when the view is disposed.
  function disposeChart() {
    observer.disconnect();
    chart.removeEventListener('pointClick', onEvent);
    container.replaceChildren();
  }
</script>

Usage and data

#

Use for categories whose end connects to the beginning, such as wind direction or time of day.

Cartesian coordinates are easier to read for ordinary rankings. Category order determines the meaning of the circle.

Data contract

PropertyInput format
dataA number array or series array of { name, data, color? }.
categoriesNames for each direction or angle.
variantChoose rose, bar, or line.

Updating data

Assign a new array or object to the property instead of mutating values inside an array. Chart events provide selection results through event.detail. When disposing of the view, clean up ResizeObserver and event listeners registered by your app.

Feature examples

#

Try 20 interactive feature examples and inspect their code. Select “Edit in preview” to combine more options in the settings panel above.

Radial bars

Compare values across cycles using bars.

Interact with the chart to see results here.
View code

Lines and markers

Read cyclical changes with thick lines and markers.

Interact with the chart to see results here.
View code

Inspect values with the pointer

Point to data to view the value at that location.

Interact with the chart to see results here.
View code

Drag to zoom and pan

Drag to zoom and hold Shift to pan. Use Ctrl + wheel to zoom in or out.

Interact with the chart to see results here.
View code

Replay animation

Redraw the same example to inspect its initial display animation.

Interact with the chart to see results here.
View code

Animation

Compare 1 examples of Animation. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Axis

Compare 1 examples of Axis. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Engine Compare

Compare 3 examples of Engine Compare. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Legend

Compare 2 examples of Legend. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Large datasets

Compare 1 examples of Large datasets. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Series

Compare 1 examples of Series. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Size

Compare 1 examples of Size. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Tooltip

Compare 12 examples of Tooltip. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Variant

Compare 4 examples of Variant. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Zoom and pan

Compare 6 examples of Zoom and pan. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Context menu

Compare 1 examples of Context menu. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Data context menu

Compare 1 examples of Data context menu. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Read coordinates and data

Compare 1 examples of Read coordinates and data. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Overview

Compare 3 examples of Overview. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

Streaming · Add and update live dataPRO

Compare 3 examples of Add and update live data. Buttons and options update both the live result and source code.

Interact with the chart to see results here.
View code

API reference

#

The full public API for sy-polar-chart. Pass objects and arrays as JavaScript properties. Select a name to view usage code and type definitions.

Key properties

Attribute / PropertyType / DefaultDescription
PolarChartVariantDefault: 'rose'Choose rose, bar, or line.
PolarChartDataDefault: undefinedA number array or series array of { name, data, color? }.
string[]Default: undefinedNames for each direction or angle.
numberDefault: 520Chart width in pixels. Update with ResizeObserver when the container changes.
numberDefault: 440Chart height in pixels.
brandLogostringDefault: undefinedThe default is the Syidax logo. With the Pro chart.branding entitlement, use none or a PNG, JPEG, or WebP data URL.
brandPosition'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'Default: 'bottom-right'The corner where the logo is anchored. Applies equally to Community and Pro, on screen and in image exports.
PolarChartStackingModeDefault: 'normal'Stack mode — `normal` (value units) or `percent` (each direction fills 100%).
sectorPaddingnumberDefault: 0.12Fraction of each angular slot kept as whitespace (half each side), 0..0.8.
barPaddingnumberDefault: 0.1Set as an HTML attribute or JavaScript property. type: number.
lineWidthnumberDefault: 2Set as an HTML attribute or JavaScript property. type: number.
markerSizenumberDefault: 4Set as an HTML attribute or JavaScript property. type: number.
fillOpacitynumberDefault: 0Set as an HTML attribute or JavaScript property. type: number.
chartTitlestringDefault: undefinedThe title inside the chart. Explain the data's unit and meaning alongside it.
chartSubtitlestringDefault: undefinedThe subtitle inside the chart.
showRingLabelsbooleanDefault: trueSet as an HTML attribute or JavaScript property. type: boolean.
booleanDefault: falseWhether to show a legend for series or items.
legendPositionPolarChartLegendPositionDefault: 'bottom'Where the legend is positioned.
tooltipShowbooleanDefault: trueWhether to display the built-in tooltip.
PolarChartTooltipInputDefault: undefinedTooltip settings for pointer-driven values, position, and content.
CartesianZoomInputDefault: undefinedSettings for zooming and the visible range.
animatedbooleanDefault: falseWhether to animate initial display and data changes.
animationDurationnumberDefault: 600Animation duration in milliseconds.
animationEasingPolarChartEasingDefault: 'ease-out'Allowed values: linear, ease-out, ease-in, ease-in-out. Default: 'ease-out'.
animationTypePolarChartAnimationTypeDefault: undefinedAllowed values: initial, update. Default: undefined.
Other properties 20
Attribute / PropertyType / DefaultDescription
PolarChartPaletteNameDefault: 'tableau10'Allowed values: tableau10, tableau20, observable10, paired12, set3_12. Default: 'tableau10'.
ReadonlyArray<string>Default: undefinedPass as a JavaScript property. type: ReadonlyArray<string>.
number | 'auto'Default: 'auto'Radial-axis max in value units; 'auto' (default) nice-ceils the stacked max.
gridColorstringDefault: '#e2e8f0'Set as an HTML attribute or JavaScript property. type: string.
ringLabelColorstringDefault: '#6b7280'Set as an HTML attribute or JavaScript property. type: string.
ringLabelFontSizenumberDefault: 10Set as an HTML attribute or JavaScript property. type: number.
categoryLabelColorstringDefault: '#374151'Set as an HTML attribute or JavaScript property. type: string.
categoryLabelFontSizenumberDefault: 12Set as an HTML attribute or JavaScript property. type: number.
legendItemsLegendItem[]Default: undefinedPass as a JavaScript property. type: LegendItem[].
legendFloatAlign'start' | 'center' | 'end'Default: 'end'`legend-position="float"`: the overlay's horizontal anchor inside the drawing rectangle.
legendFloatVerticalAlign'top' | 'middle' | 'bottom'Default: 'top'`legend-position="float"`: the overlay's vertical anchor inside the drawing rectangle.
legendDraggablebooleanDefault: false`legend-position="float"`: the floating legend can be dragged inside the chart bounds.
tooltipFormat(segment: PolarRoseSegment) => stringDefault: undefinedPass as a JavaScript property. type: (segment: PolarRoseSegment) => string.
enableMouseTrackingbooleanDefault: trueSet as an HTML attribute or JavaScript property. type: boolean.
PolarChartEngineModeDefault: 'auto'Renderer selection: auto, standard, or pro. Engine selection is separate from permission to use a Pro chart type.
PolarChartUnavailableBehaviourDefault: 'fallback'Allowed values: fallback, throw. Default: 'fallback'.
proThresholdnumberDefault: POLAR_DEFAULT_PRO_THRESHOLDSet as an HTML attribute or JavaScript property. type: number.
streamSourcePolarChartStreamSourceDefault: undefinedA stream source for live data. Check the contract for the specific type.
streamWindownumberDefault: undefinedThe streaming data range to keep visible.
streamMaxnumberDefault: undefinedThe maximum number of streaming data points to retain.
Events 15
EventsDetail typeDescription
PolarChartRenderResult & { tier: PolarChartEngineTier }Emits rendering results in detail when chart drawing completes.
PolarChartPointEventDetailA point selection event. Read the selected data and index from CustomEvent.detail.
PolarChartPointEventDetail | nullCustomEvent.detail type: PolarChartPointEventDetail | null. Event names are case-sensitive.
ChartPointContextMenuEventDetail<PolarChartPointEventDetail>CustomEvent.detail type: ChartPointContextMenuEventDetail<PolarChartPointEventDetail>. Event names are case-sensitive.
{ index: number; seriesId: string; label: string; disabled: boolean }CustomEvent.detail type: { index: number; seriesId: string; label: string; disabled: boolean }. Event names are case-sensitive.
{ index: number; seriesId: string; disabled: boolean }CustomEvent.detail type: { index: number; seriesId: string; disabled: boolean }. Event names are case-sensitive.
{ count: number }CustomEvent.detail type: { count: number }. Event names are case-sensitive.
{ dropped: number }CustomEvent.detail type: { dropped: number }. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
voidCustomEvent.detail type: void. Event names are case-sensitive.
PolarChartTooltipShowEventDetailWhether to display the built-in tooltip.
voidCustomEvent.detail type: void. Event names are case-sensitive.
PolarChartTooltipActionEventDetailCustomEvent.detail type: PolarChartTooltipActionEventDetail. Event names are case-sensitive.
CartesianZoomChangeEventDetailStorybook parity (2026-09-10) — fired after every zoom change (drag / pan / wheel / pinch / keyboard / api / reset) with the new state.
Methods 23

Stencil methods return Promises. Use await within an async function to read the result.

Method / ArgumentsReturn typeDescription
Promise<PolarChartRenderResult>An asynchronous method. Check the argument and return types below.
Promise<PolarChartEngineTier>An asynchronous method. Check the argument and return types below.
Promise<ChartDataTable>Current normalized source table, including retained streaming rows, independent of the renderer.
data: PolarChartDataPromise<void>An asynchronous method. Check the argument and return types below.
datum: PolarRoseRowDatumPromise<void>An asynchronous method. Check the argument and return types below.
datums: ReadonlyArray<PolarRoseRowDatum>Promise<void>An asynchronous method. Check the argument and return types below.
count?: numberPromise<void>An asynchronous method. Check the argument and return types below.
datums: ReadonlyArray<PolarRoseRowDatum>Promise<void>An asynchronous method. Check the argument and return types below.
Promise<PolarChartStreamSource | undefined>An asynchronous method. Check the argument and return types below.
Promise<ChartEngineStatus>The requested engine, the engine that draws and why (ROADMAP-loading §5.3). A Chart Pro license decision names `chart.webgpu` and its state; renderer causes (not in this build, no WebGPU, a failed GPU) stay apart.
options: { duration?: number; easing?: PolarChartEasing; enabled?: boolean; type?: PolarChartAnimationType }Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
Promise<void>Replay the radial-grow reveal. No-op when animation is off.
cssX: number, cssY: numberPromise<PolarChartPointEventDetail | null>An asynchronous method. Check the argument and return types below.
categoryIndex: number, seriesIdOrIndex: string | numberPromise<PolarChartPointEventDetail | null>An asynchronous method. Check the argument and return types below.
Promise<void>An asynchronous method. Check the argument and return types below.
request: CartesianZoomRequestPromise<CartesianZoomChangeEventDetail | null>Zoom to explicit windows of the drawing (`x` / `y` as `{ min, max }` or `[min, max]` fractions 0 … 1; `null` clears that orientation).
factor: number, anchorFraction?: numberPromise<CartesianZoomChangeEventDetail | null>Scale the current windows by `factor` (< 1 zooms in) around `anchorFraction` (0..1, default centre).
delta: { x?: number; y?: number }Promise<CartesianZoomChangeEventDetail | null>Slide the zoomed windows by fractions of the drawing (`{ x?, y? }`); a no-op at the full extent.
Promise<CartesianZoomChangeEventDetail | null>Back to the full drawing.
Promise<CartesianZoomState | null>The current zoom state (`null` = the full drawing).
request?: CartesianZoomExtentRequestPromise<CartesianZoomExtentDetail | null>The full extent of the viewport axes (`[0, 1]` each, key `'0'`).