Reputation: 559
I want to create this kind of semi circle donut chart.
"series": [
{
"name": "xxx",
"y": 4,
"start": "50%",
"end": "40%"
},
{
"name": "yyy",
"y": 10,
"start": "40%",
"end": "10%"
},
{
"name": "zzz",
"y": 9,
"start": "10%",
"end": "-15%"
}
]
START and END points dataLables also has to be displayed in the chart like it is in image. Is it possible?
Upvotes: 2
Views: 3397
Reputation: 1520
Here is a solution that uses ZingChart. This uses a combination of two chart, a pie chart and a gauge chart.
The half donut is created with the scale-r > aperture
attribute set to 180 (which makes a half circle) and the plot > slice
attribute set to 80 (which makes the hole of the donut).
The gauge chart, which is placed directly over the pie chart, has most of its attributes hidden. However, by setting the same aperture and slice values, we can more easily place labels around the chart. Take note of the scale-r > item > rules
array that is used to make only certain items visible through the use of the alpha
(transparency) attribute, which is set to 0 in the scale-r > item
object.
I'm on the ZingChart team, please let me know if you have any questions :)
Upvotes: 3