futuredapp / donut

Doughnut-like graph view capable of displaying multiple datasets with assignable colors
MIT License
546 stars 46 forks source link

Half Donut Problem #95

Closed oguzhankrky closed 1 year ago

oguzhankrky commented 1 year ago

I have a half donut but Constrait take up space like full donut. Could you help me about it ? Screen Shot 2023-10-06 at 10 59 29

matejsemancik commented 1 year ago

Hello 👋

The Donut view will always take up space needed to render full circle, no matter the utilised space of internal Canvas. This is intended behaviour.

oguzhankrky commented 1 year ago

Hello :D how can I change it could you help me if ıt is possible?

matejsemancik commented 1 year ago

Unfortunately, the only thing you can do right now is to find a way to clip the view into half using your preferred method of choice (eg. Clipping Composable using .clip modififer, or using .drawWithContent method, but this would still leave you with rest of layout taking up unwanted space.

I'm adding this as a feature request -- the behavior you describe would need to be supported by the View implementation.

btw, do you use Android View, or Composable version?

oguzhankrky commented 1 year ago

I am using AndroidView . I guess I will be able to fix thanks to using translationY this problem . Thank you