-
-
Notifications
You must be signed in to change notification settings - Fork 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
Moving pie chart location (legend overlaps chart) #707
Comments
I just played with the ChartsDemo pie chart, similar case. I guess you have to modify some code and re-build it so you can use. |
Hi royhema I want to use pieBarChar but there's no documentation on how to use it , and I tried to translate demo project as I don't know Objective-C but a lot of errors are showing , can you just show me how to get and put hard coded values just as an example , so I get an idea on how to work with dynamic numbers . Thanks very much. |
@dushiarlind your question is not clear. you have to understand you just needs to create pie chart data set with your values, and create pie chart data and feed it to pie chart view. Objc is one of the most easiest code to read and understand, you just have to get the idea. take a look at PieChartDataSet *dataSet = [[PieChartDataSet alloc] initWithYVals:yVals1 label:@"Election Results"]; |
@liuxuan30 Sorry for not clearing things up. I've put a uiview in my storyboard , set class to PieChartView and created an IBOutlet . Now I need this pie to show me 3 slices with different numbers which will come to me from json object. |
as I said, "you have to understand you just needs to create pie chart data set with your values, and create pie chart data and feed it to pie chart view." You should look at the ChartsDemo first. |
@royherma Were you able to figure out moving the location of the PieChart or did you create a custom Scroll view for the legend like @liuxuan30 suggested? |
I created a custom scroll view legend from scratch. On Wed, Mar 2, 2016 at 11:14 AM, Kelo Akalamudo notifications@github.com
|
If you want complete control, you can now (on |
Is there a way to control the location of the actual chart within the actual PieChartView? My view spans across the whole view controller's UIView, but is always centered. The rendering rect is private for the PieChartView so I can't access it, any ideas of how I can solve the issue (could involve legend as well). I added a picture for reference.
Thanks!
The text was updated successfully, but these errors were encountered: