Closed matthewcheok closed 9 years ago
Hi @matthewcheok, Could you please provide a screenshot? It seems extremely odd... Thanks!
Sorry for the misunderstanding. It's more of a feature request I guess. I'm looking to plot unevenly spaced data.
@matthewcheok basically you want a scatter plot but having the dots connected with a line, right?
Not quite... I have data in the form of prices and dates but the dates are not in regular intervals. I want a continuous trend line through the points.
I see, this is an interesting feature. If you're familiar with the way BEMSimpleLineGraph works, what would you think is the best way to implement it?
How about adding a datasource method like - (CGPoint)lineGraph:(BEMSimpleLineGraphView *)graph pointAtIndex:(NSInteger)index
so I can specify both the x and y values?
This could be optional and take precedence over - (CGFloat)lineGraph:(BEMSimpleLineGraphView *)graph valueForPointAtIndex:(NSInteger)index
.
Hi @matthewcheok, Would by any chance this issue and the issue #104 be the same?
A simpler way to implement it would maybe be that if you supply a null value for - (CGFloat)lineGraph:(BEMSimpleLineGraphView *)graph valueForPointAtIndex:(NSInteger)index
, the graph would skip this section and connect the previous and next dots together? (still respecting the X axis places).
I guess the idea is similar. How would you specify a null value of type CGFloat
?
@matthewcheok If use Swift, you can return a nil
or CGFloat
by use CGFloat?
PR #129 adds the ability to specify a NULL value. It is currently under review, but it looks like we'll be merging it here in the next few days.
Pull Request #129 has been merged, and commit 16b1a40a32c81652ddeb0923d3121c8986ceb6f9 should add the requested feature.
Fine-tuned control and positioning is not, and likely will not be, supported by BEMSimpleLineGraph. The goal of the project is to remain lightweight and easy to use. Custom data point positioning would break a great deal of things in the project.
Thanks for the feature request! Glad to have found a solution. HUZZAH! :fireworks:
I'm not sure if there's a solution for this - my data is unevenly spaced in the x-axis. I still want a continuous line through the points.