Comments (12)
Hi @japanconman,
This is a feature that I would like to see implemented as soon as possible. Unfortunately, I'm pretty busy right now and won't have time to work on it in the near future.
Would you be interested on working on this feature?
from bemsimplelinegraph.
@Boris-Em : yeah, i would like to help. Just not sure I'm up to your coding standard :D. Kinda new to GitHub, how can I commit changes to the "feature" branch?
from bemsimplelinegraph.
@japanconman,
Great news!
You won't be able to commit changes directly to the project. What you can do though, is fork the feature branch of the project, work on the new feature and then open a pull request on the same branch, which I will be able to review and merge to the project (with a new commit).
I think that the best way to design this new feature, would be to make it as close as possible from the way the X-Axis Labels work. Keep in mind that it should stay optional.
Let me know if you want to talk about it more, or if you need help with anything!
Thanks a lot for the help!
from bemsimplelinegraph.
Hi @Boris-Em , there are few things I would like to add in as well
. See what's your opinion.
-
Multi-line text support for X-Axis label.
I've added it in, but I didn't touch too much on the constant that you are using i.e. "padding", "labelXaxisOffset.
-
Y-Axis label with aware of autoScaleYAxis
I'm thinking when autoScaleYAxis=YES, it's cleaner to just show the min, median and max value, whereas absolute range is used for autoScaleYAxis=NO
-
Overlapping label removal
The intent is to remove overlapping labels on both axis when there are just too many values. However, this contradicts with numberOfGapsBetweenLabelsOnLineGraph method. What you think?
-
Subtle reference line for axis value across graph
See the red arrows. The reference line will appear according to the axis label. Looking at the code structure, I'm not sure where's the best place to put this in. (Need some help on CG drawing also)
from bemsimplelinegraph.
Hi @japanconman,
Sorry for the late reply. I'll take a look at the pull request you submitted this week end. From what I saw so far, it looks amazing!
- 1 & 2: Great
- 3: What do you have in mind exactly? A BOOL property like
displayOverlappingLabels
(defaults to YES) that hides the overlapping labels if set to NO?
If so, we could make this feature work only ifnumberOfGapsBetweenLabelsOnLineGraph
returns 0 (when all the labels are displayed). I'm also thinking about making this method optional. If it's not implemented, all the labels would be displayed, just like if it would return 0. - 4: This is a good idea, we have to think about how to implement it though. I feel like it should be drawn on a different UIView, it should give us more flexibility.
Thank you so much for all the hard work! This is truly great!
from bemsimplelinegraph.
@Boris-Em , sounds good.
On pt 4, I'm wondering what if we implement it right in the BEMLine class. Since all the data point references and CG drawing are done within that class.
from bemsimplelinegraph.
+1 for pt3, that would be super useful
+1 for pt 4, though again it's good for this to be optional on both X and Y axes.
This lib is kicking some serious ass! Two months ago I was disappointed by the lack of featured, beautiful graphing libs available on iOS. I was even considering using webKit + JS! Not anymore, BEMSimpleLineGraph has it all covered, with more features on the way. Awesome.
from bemsimplelinegraph.
@japanconman
Thanks a lot for your PR. It looks great!
- Pt3:
numberOfGapsBetweenLabelsOnLineGraph
is now optional with the latest commit I pushed. All of the labels are displayed if the method is not implemented. From what I can tell, it looks like the overlap feature works pretty well. I think that I will add a property to make it optional though. Good job! - Pt4: I don't see anything wrong with drawing them directly in BEMLine.
@jasonmcdermott
Thanks for all your help with the library. Your inputs are spot on!
from bemsimplelinegraph.
@japanconman @Boris-Em @jasonmcdermott The requested feature, (point four) is now implemented on the feature branch. See commit 2b16d64.
I should note however that there is still work to do on this feature. As of now it only supports x-axis / vertical reference lines and an x-axis label frame. I have not yet added support for the y-axis or multiline x-axis label (these features seem to be incomplete and little bit wonky).
Additionally, in lieu of the git-spirit I would suggest making a separate issue for each of those points. Then, as we work on them we can "cross them off" and manage them individually.
from bemsimplelinegraph.
@Sam-Spencer, it just happened that I tried put in the Y reference line yesterday too. Based on the committed codes, our codes are very similar. :) (just by l
from bemsimplelinegraph.
(Fat fingers typing on the phone...)
...(just by looking at codes only, haven't test on Xcode)
For Y reference drawing what I did was separate out the drawLine method from drawDots. And call the drawLine after drawYAxis. Other than that, it's pretty close.
I notice that drawDots have to be called before drawYAxis, so there are available yAxisValue for drawYAxis to create the labels.
I guess that should be the key. Will input more when I got chance to sit in front of Xcode these few days.
Cheers.
from bemsimplelinegraph.
As advised by @Sam-Spencer, I opened a new issue (#40) for point4, and another one (#41) for the Y-axis label support.
Please continue the discussion regarding these specific features on the appropriate issue. Thank you!
Closing this issue as duplicate.
from bemsimplelinegraph.
Related Issues (20)
- How can i set fixed value for X-axis space between ?
- when my points count is two. enableBezierCurve = YES; Why the main line? HOT 2
- Scaling the values on y-axis HOT 2
- Today Extension drawing issue
- Graph not showing values for large data set HOT 3
- Point of Y Axis is not showing correctly. HOT 2
- Add multiples lines on Graph.? HOT 1
- Graph not working in iOS 10.0.1 HOT 2
- Can't update pod from 4.1 to 4.1.1 HOT 3
- Deprecated Code - self.viewForBaselineLayout HOT 1
- Long X-Axis Labels Hidden (iPhone 6 and above) HOT 2
- DataSource and Delegate use of `NSInteger` instead of `NSUInteger` in regards to Swift and Casting HOT 3
- Unavailable some functions after migrating to swift 3 HOT 2
- Long X-Axis Labels Hidden HOT 2
- Uneven X-Axis Label Spacing HOT 2
- How can we avoid the extra curve line? HOT 6
- How to customize the Gradient layer? HOT 1
- swift 4 HOT 1
- Is it possible to make some gaps on a same line plot?
- y axis values not visible HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bemsimplelinegraph.