-
-
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
LineChart Axis Inset? #46
Comments
@PhilJay what do you think? do we have an easy way of "skipping" x-indexes? |
Well an easy workaround could be to use "" as the first x value and then insert the first entry at x index 1 |
@msanders did that solve your problem? |
@danielgindi No, that insets it much more than I wanted. Is it not possible to add an inset property just for layout? |
Not right now - we'll have to look into it |
Any News about above mentioned issue ? |
@BurhanMughal Please, you are creating too much noise in the system. If there were new, you would have known. You are welcome to try to implement whatever feature is missing, or wait until someone else or I make it. |
Sorry Daniel if you feel bad. But i was just looking to get informed that the issue is still in process because you closed this issue. |
@danielgindi Any thoughts as to how we could go about implementing this? Would it just be an update to |
I closed it earlier when there was no response to the suggestions
|
Well it wouldn't be just about the XAxisRenderer as the other renders (the בתאריך יום רביעי, 13 במאי 2015, Daniel Cohen Gindi danielgindi@gmail.com
|
Tried to analyze the ChartViewPortHandler.swift file in order to set the inset. So far without any success. It's hard to understand the code. I tried to modify the Does someone can give me a short hint? |
speaking of view port handler, you need to think about the transformers. ios-charts need the transformer to calculate the postions. will adding slight offset in transformer help? |
tried @PhilJay suggestion but it's problematic when you have few entries... |
did anyone try to change chartXMin so it will have slight offset at the beggining? I remember I tried once, and deltaX potentially impacts the offset on right side |
Implemented in Charts 3.0 (v3 branch) (Use |
does it hold a property for that? |
Found solution for spacing on xAxis |
spaceMin / spaceMax didn't work for me but adjusting axisMinValue / axisMaxValue slightly did. |
@DevangiDesai solution does work if you want to add padding on xAxis at right and left.
Here's a preview for future viewers: |
Hi, this is an old issue, but I have a problem when I try to do this: the space is working, but I'm not being able to draw the twelve months, any idea? |
Hi Guys, Can someone point the exact configuration for LineChartView so it displays paddings from left and right ? @DevangiDesai I tried code below too, but with no luck. Is there any chance that some other configuration is overlapping this settings ?
|
Today i faced the same problem as you guys. The methods to use are:
If you want it to work you have to set these properties before you set the data of the chart (at least i got it this way to work) So for my project i did it this way:
I hope this helps someone in the future. Great library btw, i love it! |
Not the solution, but will help anyone who searches for how to remove the paddings:
|
Thank you @seriyvolk83, this solved the problem I was having! |
Hi, thanks for the great library! Is it possible to add an inner padding to x axes as shown in the picture below?
I.e., both the first and last points and xAxis labels are inset by ~15px. Would be super useful. Thanks!
The text was updated successfully, but these errors were encountered: