EasyVizi Sunburst turns hierarchical data – categories, sub-categories and values – into a multi-level pie chart where every ring is one level of the hierarchy. Each segment is sized by its share of its parent, so the outermost ring shows the finest breakdown.
Three ways to add a chart
[easyvizi_sunburst title="Revenue" height="420"] ...JSON... [/easyvizi_sunburst], or point it at a JSON file with src="https://example.com/data.json". Settings EasyVizi Sunburst has a builder that turns pasted JSON or CSV into a ready-to-paste shortcode (and the matching PHP call).echo easyvizi_sunburst( $data, array( 'title' => 'Revenue' ) ); in any theme file.Two data formats
A nested tree:
`
[
{ “name”: “Acquisition”, “children”: [
{ “name”: “Search”, “value”: 4100 },
{ “name”: “Social”, “value”: 1750 }
] },
{ “name”: “Revenue”, “value”: 5200 }
]
`
Or a flat list of rows, which is easier to produce from a spreadsheet. Leave parent empty for a top level row and give parent rows a value of 0 so their children are added up:
`
[
{ “id”: “search”, “parent”: “”, “label”: “Search”, “value”: 0 },
{ “id”: “search-organic”, “parent”: “search”, “label”: “Organic”, “value”: 4100 },
{ “id”: “search-paid”, “parent”: “search”, “label”: “Paid”, “value”: 2300 }
]
`
A CSV export works too: import it in the block sidebar, or paste it into the builder on the settings screen. The first row names the columns – id, parent, label, value – in any order and with the usual aliases (key, name, size). Parent rows take a value of 0 so their children are added up.
Highlights
colors attribute.languages/easyvizi-sunburst.pot.The plugin was renamed from “Sunburst Chart” to EasyVizi Sunburst; [sunburst_chart] and older saved block markup still work.
Shortcode attributes
There are sixteen, covering size, rings, labels, the center, the legend and your own hex palette. The complete list, with values and defaults, is in docs/SHORTCODE.md.
The five you are most likely to reach for:
title – caption above the chart.height – pixels, 120 to 2000, default 560. The chart is square, so the column caps the width.arc_labels – off (default), auto, curved, radial, tangential or horizontal.colors – comma separated hex colors, e.g. colors="#4e79a7,#f28e2b". Hex only.src – URL returning JSON, used instead of inline data. Cached for one hour.