-
Notifications
You must be signed in to change notification settings - Fork 165
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
Displayed points for series in the graph. #15
base: master
Are you sure you want to change the base?
Conversation
How use: yourSeriesName1.points = true yourSeriesName1.points = false chart.poinstWidth = 2.0
@@ -291,6 +297,12 @@ class Chart: UIControl { | |||
|
|||
if series.line { | |||
drawLine(xValues: scaledXValues, yValues: scaledYValues, seriesIndex: index) | |||
if series.points { | |||
for i in 1..<scaledXValues.count { | |||
drawPoints(xValues: scaledXValues, yValues: scaledYValues, seriesIndex: index, i: i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I understand it, drawPoints
actually draws only one point for the coordinates at the i
position. I'm confused by the plural in the method name. Why pass all the xValues
and yValues
as arguments?
Hi @pryaniq thanks for your PR! I really appreciate the help. The points (better called markers) are a nice addition to the chart. However I think we should provide a way to use a custom marker, e.g. I would not hard code the layer into the There are some things in the code I have not clear – and performance improvements I'd like to apply (see comments). Would you mind to discuss the feature before going on with the PR? |
For example, each |
@gpbl thanks for review. I will try to fix the code, according to the comments. |
How use:
yourSeriesName1.points = true
yourSeriesName1.points = false
chart.poinstWidth = 2.0