XChart
XChart copied to clipboard
How to Add Multiple series to a Donut Chart (Multiple Rings)
Today, If I want to create a donut chart, I need to do this: PieChart chart = new PieChartBuilder().width(800).height(600).title("Pie Chart with Donut Style").build(); chart.getStyler().setDefaultSeriesRenderStyle(PieSeriesRenderStyle.Donut); chart.addSeries("A", 22); chart.addSeries("B", 10); chart.addSeries("C", 34); chart.addSeries("D", 22); chart.addSeries("E", 29); chart.addSeries("F", 40); So, the sections are named as series here. I want to create a donut chart with multiple rings in it each representing a different series of data. Is there a way to achieve this? If not can I request support for this new feature.
@timmolter What needs to be done?
Can this issue provide suggestions?
It could be like multiple y-axis groups like in line charts where you specify the donut ring index...
@Mr14huashao What do you think? Could you implement this using an "axis Index"?
@timmolter No original effect picture, not sure what to make it look like.
option = { angleAxis: { show: false, max: 10 }, radiusAxis: { show: false, type: 'category', data: ['AAA', 'BBB', 'CCC', 'DDD', 'E', 'F'] }, polar: {}, series: [ { type: 'bar', data: [3, 4, 5, 6, 7, 1], colorBy: 'data', roundCap: true, label: { show: true, // Try changing it to 'insideStart' position: 'start', formatter: '{b}' }, coordinateSystem: 'polar' } ] };