You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an arrays for values and dates which I want to show on chart. But labels on x-axes are not linked to chart data points. They just spread thru x-axes evenly. I would like to labels on x-axes be linked to data points and positioned straight below chart point.
Arrays measureDates and measureDatesString have equal values just in different format. I use it for investigation.
If I change my code:
for i in 0..<weight.count {
let entry = ChartDataEntry(x: Double(measureDates[i]), y: Double(weight[i]))
chartEnties.append(entry)
}
and instead using date from measureDates array Double(measureDates[i]) put index to value x like let entry = ChartDataEntry(x: Double(i), y: Double(weight[i])) x-axes label will be positioned straight below data points, but of cause values be "01/01" for every point and it is not what I need.
The text was updated successfully, but these errors were encountered:
I have an arrays for values and dates which I want to show on chart. But labels on x-axes are not linked to chart data points. They just spread thru x-axes evenly. I would like to labels on x-axes be linked to data points and positioned straight below chart point.
Here is my chart:
And my code below:
Arrays
measureDates
andmeasureDatesString
have equal values just in different format. I use it for investigation.If I change my code:
and instead using date from
measureDates
arrayDouble(measureDates[i])
putindex
to valuex
likelet entry = ChartDataEntry(x: Double(i), y: Double(weight[i]))
x-axes label will be positioned straight below data points, but of cause values be "01/01" for every point and it is not what I need.The text was updated successfully, but these errors were encountered: