-
Notifications
You must be signed in to change notification settings - Fork 19.6k
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
endAngle support for pie chart #4326
Comments
@jarben Just recently, I was looking for a similar option. I wanted to use the endAngle on a polar bar chart to achieve the exact same look. I solved it in a hacky sort of way, by leveraging echarts.registerProcessor and re-setting the axis extent. I'm not really sure that it is officially supported, so I'll let @pissang and @Ovilia and @100pah chip in. echarts.registerProcessor(ecModel => {
if (ecModel.getComponent('polar')) {
ecModel
.getComponent('polar')
.coordinateSystem.getAxis('angle')
.setExtent(90, -180);
}
}); Here's a working example. I've used registerProcessor in the past to get some things like bandWidth of heat map to dynamically show or hide labels. |
Awesome, thanks so much for the example @jonavila ! Didn't know about registerProcessor - I'm sure I'll find a lot use of that! Again - thanks for your solution & example.. |
This solution dont work in Echarts version 4.0.2+ :| |
Version: 3.2.3
Would be great if pie chart has endAngle proproty, similar to the gauge chart. I'm trying to achieve this:
Where what I seem to be able to achieve with pie chart is:
Also, I wonder whether this could be actually rendered as a bar chart with "polar" coordinate system. I haven't seen this type supported in the doc so haven't tried. This would potentially allow to render things like this one?
The text was updated successfully, but these errors were encountered: