Charts - Polar

Nightingale and rose charts with radial bars proportional to value, arranged around a circular axis.

#Usage

import { ChartAnnotation, ChartCanvas, ChartCaption, ChartExportMenu, ChartHover, ChartItem, ChartLegend, ChartPolar, ChartStacked, ChartSvg, ChartTitle, ChartTooltip, ChartYAxis } from '@primeui/vue-chart';
<ChartSvg>
    <ChartPolar :data="data" category-x-field="categoryXField" value-y-field="valueYField" />
</ChartSvg>

Polar charts arrange radial bars around a circular axis, where bar length scales to each value. Good for cyclical comparisons like time-of-day or directional data. Set innerRadius to create a hollow center for the classic wind rose look.

#Basic

Set categoryXField and valueYField to map data fields. Bar length scales to each value against the shared radial axis.

Loading Demo...

#Inner Radius

Set innerRadius to cut a hollow center. The value is a ratio of the outer radius: 0.4 creates a hole 40% as wide as the chart. Combine with ChartStacked and a circle grid for the classic wind rose style.

Loading Demo...

#Colors

Pass an array to color to assign a custom palette; bars cycle through colors by index. Keep the palette balanced across cool, warm, and neutral accents so cyclic sectors stay readable. For per-bar control, pass a function that receives each data item and returns a color string.

Loading Demo...

#Gradient Color

Pass a gradient object to color to apply a controlled intensity fill to all bars. For per-bar gradients, pass an array of gradient objects to color.

Loading Demo...

#Sorted

Set sort to reorder bars before rendering. Use value-desc to place the tallest bar first, or label-asc for alphabetical order. Sort does not affect the underlying data, only the visual arrangement.

Loading Demo...

#Border

Set borderStrokeWidth and borderColor to add a stroke around each bar. Use borderRadius for rounded bar arc corners. Set borderDash for a dashed stroke and spacing (in pixels) to introduce gaps between bars.

Loading Demo...

#Grid Shape

Set gridShape="polygon" on ChartYAxis to render angular polygon grid lines instead of the default concentric circles. Polygon grids give a spider-web appearance, useful when the angular structure of the data warrants it.

Loading Demo...

#Grid Styling

Grid styling lives on ChartYAxis. Set tickCount to control the number of concentric levels. Visibility follows the same model as cartesian axes: showLine="false" hides the spoke lines, gridLines="false" hides the concentric rings, and showLabels="false" hides the value labels. Use gridColor, gridStrokeWidth, and gridOpacity to adjust the grid line appearance, and set gridStyle to dashed or dotted for non-solid grid lines.

Loading Demo...

#Grouped

Place multiple ChartPolar components as siblings; each series automatically positions its bars within each angular sector. Useful for comparing two or more datasets across the same categories on a shared radial axis.

Loading Demo...

#Stacked

Wrap multiple ChartPolar components inside ChartStacked to stack bars radially outward. Each series accumulates on top of the previous one.

Loading Demo...

#Percent Stacked

Set mode="percent" on ChartStacked to normalize each sector to 100%. Shows the relative proportion of each series rather than absolute values, useful for comparing composition across categories.

Loading Demo...

#Declarative

Define bars inline using ChartItem children instead of a data array. Each ChartItem accepts category-x, value-y, and color.

Loading Demo...

#Title & Caption

Add ChartTitle to display a title above the chart and ChartCaption for a descriptive line beneath it. Adding both reduces the available chart area.

Loading Demo...

For full configuration see Title & Caption.

#Hover

ChartHover brightens the hovered bar while the rest stay at normal opacity. Set brightness to control the lightening factor, and set dimOpacity below 1 when you intentionally want non-hovered bars to fade.

Loading Demo...

For full configuration see Hover.

#Tooltip

Add ChartTooltip to show data details on hover. The tooltip displays the category label, value, and series name for the hovered bar.

Loading Demo...

For full configuration see Tooltip.

#Legend

Add ChartLegend to display an interactive legend. Each ChartPolar series appears as a separate entry; click any item to toggle that series.

Loading Demo...

For full configuration see Legend.

#Annotation

Use ChartAnnotation to render custom content overlaid on the chart area. The render callback receives chartArea, center, xScale, yScale, textColor, and ctx (Canvas mode only). Use center to position content at the chart's center; xScale and yScale are null for polar charts. Combine with innerRadius to place content in the hollow center. In SVG mode return a VNode. In Canvas mode draw to ctx and return null.

Loading Demo...

For full configuration see Annotation.

#Animation

Pass the chart-root animation prop (<ChartSvg> / <ChartCanvas>) to control entrance and update transitions. Bars grow from zero height at the inner radius on entrance and interpolate to new positions on data updates.

For full configuration see Animation.

#Export

Add ChartExportMenu to let users download the chart as PNG, SVG, or PDF.

See Export for format options and programmatic export.

#Responsive

See Responsive for container sizing, aspect ratio, and breakpoint configuration.

#Accessibility

See Accessibility for ARIA labels, keyboard navigation, and screen reader support.

#API

#ChartPolar

Visual styling props with type accessor → R accept a static value, a per-bar array, a field name (keyof T), or a callback (ctx: ItemContext<T>) => R | undefined. Color-family arrays cycle modulo length; other accessor arrays clip and fall back to the series default.

PropTypeDefaultDescription
dataT[]-Data array. Mutually exclusive with ChartItem children
categoryXFieldaccessor → string'category'Category label for each angular sector
valueYFieldaccessor → number'value'Radial value field
coloraccessor → FillValuedefault paletteBar fill color. Static color, per-bar array (cycles by index), field name, or callback
opacityaccessor → number1Bar fill opacity in [0, 1]. Per-bar via array/callback/field-name
namestring-Series name, used in legend and tooltip
keyFieldstring-Field name for stable item identity, used for animation matching when data is reordered
idstringautoUnique dataset identifier
ordernumberautoStacking order when inside ChartStacked. 0 = innermost
innerRadius0–10Hollow center ratio. 0 = solid bars from center, 0.4 = hole 40% of the radius
spacingnumber8Gap between bars in pixels
sort'value-asc' | 'value-desc' | 'label-asc' | 'label-desc'-Bar ordering before render
borderRadiusaccessor → BorderRadius-Bar arc corner radius
borderColoraccessor → FillValue-Bar border stroke color
borderStrokeWidthaccessor → number-Bar border stroke width (px)
borderDashaccessor → number[]-Dash pattern [dashLength, gapLength]. Also accepts named shortcuts
borderDashOffsetaccessor → number0Offset for the dash pattern
hoverColoraccessor → FillValue-Per-bar fill color on hover. Short-circuits the global ChartHover.brightness cascade
hoverBorderColoraccessor → FillValue-Per-bar border color on hover

#ChartYAxis (radial grid)

The concentric grid is configured on ChartYAxis, not on ChartPolar. Add a ChartYAxis to style it. The number of rings follows the axis tickCount.

PropTypeDefaultDescription
gridShape'polygon' | 'circle''circle'Concentric grid shape: smooth circles or angular polygon
tickCountnumberautoNumber of concentric grid levels (rings)
showLinebooleantrueShow the spoke lines (center to outer)
gridLinesbooleantrueShow the concentric grid rings
showLabelsbooleantrueShow the value labels
gridColorstringthemeGrid line color
gridStrokeWidthnumber0.5Grid line thickness (px)
gridOpacity0–10.6Grid line opacity
gridStyle'solid' | 'dashed' | 'dotted''solid'Grid line dash style

See Axes for the full axis prop reference.

#ItemContext

Passed to every accessor → R callback. Return undefined to fall back to the series-level default for that bar.

FieldTypeDescription
datumTOriginal data row
valuenumber | nullResolved radial value (when applicable)
indexnumberBar position within the dataset
seriesIndexnumberOrder of this series within the chart
seriesIdstringDataset id
categorystring?Resolved category label

#ChartStacked

Wrap ChartPolar children inside ChartStacked to stack bars radially. Without this wrapper, multiple ChartPolar components render as grouped side-by-side bars within each sector.

PropTypeDefaultDescription
mode'normal' | 'percent''normal'normal = absolute values stacked. percent = normalized to 100%
gapnumber0Pixel gap between stacked bar segments
idstringautoStack group identifier

#ChartItem

Use ChartItem as children of ChartPolar instead of a data array for inline bar definitions.

PropTypeDescription
category-xstringCategory label
value-ynumberRadial bar height
colorstringOverride color for this bar