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

Help needed - in changing the position for Piechart in SWIFT #3749

Closed
Suukkan opened this issue Nov 18, 2018 · 1 comment
Closed

Help needed - in changing the position for Piechart in SWIFT #3749

Suukkan opened this issue Nov 18, 2018 · 1 comment

Comments

@Suukkan
Copy link

Suukkan commented Nov 18, 2018

Hi Guys, sorry to bother u all, I just need some help and this is not an issue. I am trying for quite some time to achieve this and no luck. I also tried posting in stack overflow, but no luck there also.

I am trying to create a pie chart in my Swift program. I am using 'CHARTS' library. I have the Chart in a UIVIEW and a table view below it to display data. I am able to get the pie chart using this library (screenshot below).

I would like to know if there is any method/property in this library to do the following:

  • Move the pie chart towards the right end of the screen/view so that I can use the space in other end to populate more data. Currently the Pie chart is in the center of the view.
  • Is there any method/property to reduce the diameter of the pie chart? I would like to reduce the pie chart size little bit.
    piechart
    .
@hiralnaik
Copy link

Move the pie chart towards the right end of the screen/view so that I can use the space in other end to populate more data. Currently the Pie chart is in the center of the view.

chartView.setExtraOffsets(left: 0, top: 0, right:0, bottom: 0)

set value based on your requirements.

Is there any method/property to reduce the diameter of the pie chart? I would like to reduce the pie chart size little bit.

I don't think you can reduce the diameter of the chart but I can be wrong. But you can change hole diameter.

chartView.holeRadiusPercent = 0.50

change value based on your requirements.

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

3 participants