Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to Add Multiple series to a Donut Chart (Multiple Rings) #273

Open
prateekag opened this issue Jun 26, 2018 · 6 comments
Open

How to Add Multiple series to a Donut Chart (Multiple Rings) #273

prateekag opened this issue Jun 26, 2018 · 6 comments

Comments

@prateekag
Copy link

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.

@Mr14huashao
Copy link
Collaborator

@timmolter
What needs to be done?

Can this issue provide suggestions?

@timmolter
Copy link
Member

It could be like multiple y-axis groups like in line charts where you specify the donut ring index...

@timmolter
Copy link
Member

@Mr14huashao What do you think? Could you implement this using an "axis Index"?

@Mr14huashao
Copy link
Collaborator

@timmolter No original effect picture, not sure what to make it look like.

@timmolter
Copy link
Member

example doughnut chart

@sainagesh555
Copy link

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'
}
]
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants