Custom angle
A 270° sweep with the legend beside the ring starts.
Open the chart without page chrome ↗
const options = {
chart: {
height: 360,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "radialBar",
toolbar: {
show: false
}
},
series: [76, 61, 44, 29],
labels: ["Email", "Push", "SMS", "In-app"],
plotOptions: {
radialBar: {
startAngle: 0,
endAngle: 270,
hollow: {
size: "30%"
},
dataLabels: {
name: {
show: false
},
value: {
show: false
}
}
}
},
legend: {
show: true,
floating: true,
position: "left",
offsetX: 10,
offsetY: 10,
formatter: (n, o) => n + ': ' + o.w.globals.series[o.seriesIndex] + '%'
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
chart.render()import WestCoastCharts from 'west-coast-charts'
const options = {
chart: {
height: 360,
fontFamily: "Inter, Geist, \"IBM Plex Sans\", system-ui, sans-serif",
type: "radialBar",
toolbar: {
show: false
}
},
series: [76, 61, 44, 29],
labels: ["Email", "Push", "SMS", "In-app"],
plotOptions: {
radialBar: {
startAngle: 0,
endAngle: 270,
hollow: {
size: "30%"
},
dataLabels: {
name: {
show: false
},
value: {
show: false
}
}
}
},
legend: {
show: true,
floating: true,
position: "left",
offsetX: 10,
offsetY: 10,
formatter: (n, o) => n + ': ' + o.w.globals.series[o.seriesIndex] + '%'
},
theme: {
mode: "light",
preset: "coastal"
}
}
const chart = new WestCoastCharts(document.querySelector('#chart'), options)
await chart.render() Waiting for the chart.
Open Data & agent view to read this chart through chart.describe().
Read from the running library through its optional agent/describe module. Text, table and JSON share the same snapshot. Demo data only.
$ wcc chart export radialbar-circle-custom-angle.json --out radialbar-circle-custom-angle.svg --with-table Public agent tools 0.2.3, tested with Library 1.1.5; available from the versioned GitHub release and npm. Save a JSON spec first and check the loaded runtime and supported modules before rendering. Command reference
Loading /gallery/radialbar/circle-custom-angle/index.md …