-
-
Notifications
You must be signed in to change notification settings - Fork 6k
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
X-Axis Date values not displaying properly? #2680
Comments
@seenoevo did you figure this out? In my case when I give x: TimeInterval, the bars are tiny and transparent (barely visible) @danielgindi if you got any input on this, it would be highly appreciated |
@acegreen the problem for me was that the I'm not sure about your problem as I dont have code to reference, but maybe try changing the bar's width or look at your |
@seenoevo appreciate the response. But as you can see I was passing the correct value into my stringForValue and converting correctly. The problem is when I'm setting up my dataEntry, I was trying to pass in the timeInterval rather than an index. That ended up breaking the graphs. When I do pass x: i (ie an index) it works fine. I was hoping to plot them directly and the chart would add gaps if the intervals have gaps.
|
seenoevo could you post your code that works? I am having the same issue. |
I'm trying to display the x-label values with date strings, but it doesn't look like it's displaying properly.
My array consists of the dates "01/02/16" and "02/17/16", but it seems to display "01/05/16" and "01/28/16" on the x-axis.
Also, my bar data disappears, the x-labels are not aligned along the axis correctly, and the y-data, not y-label values, are positioned weird and do not align with the x-data date labels.
Here's what I mean:
Observations: The double value of
date
is1451721600.0
and1455696000.0
, which corresponds to the dates01/02/16
and02/17/16
respectively.However, the values printed out from the function
stringForValue
are1452000000.0
and1454000000.0
, which corresponds to the dates01/05/16
and01/28/16
, which is wrong.Why is this happening? What am I doing wrong or missing? Thanks!
The text was updated successfully, but these errors were encountered: