Skip to content
On this page

Charts > Rose Segment Chart ​

A Rose Segment Chart is a polar coordinate visualization that displays data in radial segments, resembling a rose flower, where each segment represents a category or data subset.

The Chart ​

Download example CSV
Copy HTML

Playground ​

Data

Number of segments

Animation

Total time of animation in ms

Style

Color of shape
Show segment names
Rounding of corners of shapes
Space between shapes
Show labels outside of chart
Thickness of lines
Show main line on shapes

Component API ​

The rose segment chart is built using SVG and d3.

Data ​

js
[
  {
    id: "Val 1",
    name: "Val 1",
    value: 96.7,
    color: "#bbb",
    max: 96.5,
    min: 70.2,
  },
];

Props ​

NameDefaultTypeDescription
data[]ArrayThe dataset
showLabelstrueBooleanWhether or not to show category names
externalLabelsfalseBooleanWhether or not to show the labels outside of the chart
duration500NumberThe total time of the animation in ms
minAngle0.3NumberThe minimum angle needed to display a label
cornerRadius3NumberThe rounding of the corners of each segment
padAngle0.1NumberThe space between shapes
padRadius0.25NumberThe space between shapes
strokeWidth4NumberThe width of the lines
format(d) => d.toFixed(0) + '%'FunctionThe format function for value labels
showMainLinetrueBooleanWhether or not to show lines on shapes
maxnullNumberThe maximum value of data (computed if not provided)
textColor#6b7280StringThe color for the labels
hoverColor#f9fafbStringThe color of the background of hovered segment
selectednullString | NumberThe id of the selected segment

Events ​

EventArgumentDescription
@select{ target, data }Emitted when segment is clicked
@hover{ target, data }Emitted when segment is hovered

Dependencies ​

  • d3