Added a bunch of options including left/right y axis positioning, float values in Y-Axis and popovers, and null graph values! #129
Conversation
Y Axis Position on right option to dot reference lines option to disable animation of dots Float values on the Y-Axis (Controlled by 'N' sized characters) Customizations to the no data label (Modify the color and font) Optional prefix and suffix for both the popup label as well as the Y-Axis Option to pass a custom popover view to generate a very custom popover
…nizer for detecting touches and movement. This allows popovers to initially show without needing to drag.
…lls, an option was added to interpolate the value (to draw a line through the average of the surrounding values).
Thank-you for all the hard work!! I'm glad that you've found it useful and are working on improving it. 🎉 That said, this is quite a large pull request! It will take some time to review all of the components of the request. Honestly, this is fantastic and it looks solid. We just need time to ensure that it's stable enough to be merged. Additionally, it may be helpful if you highlight key new features in the |
Sounds good. There were no breaking changes so we should be good on that front. I can modify the readme or wiki (whichever is preferred) with the additional functionality. Let me know if you have any questions about what we did, why we did it, etc! |
@RobDay do you have an update to the sample project to show some of the new features? |
@bryandunbar No, but I can add them. I considered adding them to the sample project but it would make the UI pretty cluttered if I added some of the new options. Would it be sufficient to modify some of the implementation files by explicitly setting some of the new values and comment accordingly? If the sample project had an options pane, it would make adding features like this easier for the future. |
It seems that most of the heavy documentation lives in the wiki as opposed to the readme. If you have a preferred way for me to provide wiki changes, let me know. If now, shall I fork the wiki, make my necessary changes, and point you to my fork with a commit of the respective changes? |
Yeah I agree it may be worth just adding a table view listing of different types of samples. But for ease maybe just add some commented out examples that people could swap in if they wanted to see. I have made a good bit of changes to a fork of the project as well that I was going to submit a pull request for. But I'm considering using yours instead. The only thing I have that I don't think you are handing are purely custom labels on the axis and the points using delegates. For example, I have a chart whose data points show a time like 14:13 for 14 minutes and 13 seconds. The data for the point is simple the number of seconds and I have a delegate call back to format the output value.
|
I'll add the comments to the sample app and give you an additional request this week. In terms of the missing features, that's actually on our plate for either this week or next. We have two big changes pending:
Multiple lines is pretty self-explanatory. Smarter axis labels seems to be something that you've tackled. With our current code, our X-Axis has times like The planned change would be to add the ability to specify precisely what the axis labels would show. I'm not sure of our exact implementation strategy, but it is worked that we had planned for our current sprint. Does your change support fully custom labels? Our goal would be for some magic delegate call to ask a question, you pass back either an array of label values (or perhaps a base label value and an increment), and the library draws the labels in the proper location based on the graph's coordinate system. |
…re recognizer for detecting touches and movement. This allows popovers to initially show without needing to drag." This reverts commit 6daaa32.
…nteracting with the graph
…elegate to only allow horizontal pans
…place the X and Y Axis values. These methods: - (NSInteger)baseIndexForXAxisOnLineGraph:(BEMSimpleLineGraphView *)graph; - (NSInteger)incrementIndexForXAxisOnLineGraph:(BEMSimpleLineGraphView *)graph; - (NSArray *)incrementPositionsForXAxisOnLineGraph:(BEMSimpleLineGraphView *)graph; - (CGFloat)baseValueForYAxisOnLineGraph:(BEMSimpleLineGraphView *)graph; - (CGFloat)incrementValueForYAxisOnLineGraph:(BEMSimpleLineGraphView *)graph;
… framework supports. Some of these implementions are in comments as to not chance the behavior of the sample project too much.
I have a new pull request ready to be created. The latest code lives at: https://github.com/dowjones/BEMSimpleLineGraph. This pull request would build on top of this request adding:
Being that all of these changes are built on top of this request, should I give you a second request that comprises everything in this request PLUS the new changes? Or would you rather it a different way? |
Thank you so much @RobDay for this very solid PR. I will try to find time in the next comming days to review it and hopefully integrate it to the project. |
Roger, will close this and add the second. The new pull request is located here: #132 |
Hi,
First, thanks a lot for the library. We've had some fun implementing some charts with it and adding some features to match our designs. To summarize the features that were added:
We hope you like the changes. We have some more changes in the pipeline. Within the next few weeks, we'll be adding support for multiple lines to be drawn on one graph. Additionally, we'll be adding some new delegate / datasoure methods for more customization around the values being chosen for the X-axis and Y-axis.