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

Set strict size when total angle is 180degrees #21

Open
guyzk opened this issue May 15, 2016 · 1 comment
Open

Set strict size when total angle is 180degrees #21

guyzk opened this issue May 15, 2016 · 1 comment

Comments

@guyzk
Copy link

guyzk commented May 15, 2016

Is it possible to set a specific height/width to the arc.
I am looking for a semi circle pie (180degrees) but when setting the height to a specific value the arc height takes only 50% of the view height.
Is there an option to set the width/height of the canvas that will contain the pie?
If not at least will it be possible to clip the un-needed excess empty area from the view?

capture

Also is it possible to add range labels as in the next image?

capture1

@bmarrdev
Copy link
Owner

The DecoView will always render allowing space for the arc to take up 360 degrees. When I originally developed this I implemented an auto crop and fill feature that would do what you require, but it was pulled before the initial release.

The quickest way for you to get this functionality is to fork the DecoView project and hardcode the chart to render as you prefer. With the canvas area you can look at the DecoView::recalcLayout(), which handles the positioning of the chart within the total canvas area. With the placing of the labels, you can do these as external TextViews or you can hack your placement requirements into the DecoView::onDraw() function where CanvasView::drawLabel() renders the text.

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

No branches or pull requests

2 participants