Closed peti closed 6 years ago
Another problem I've noticed is that
axis(1, at=ticks, labels=strftime(ticks, "%H:%M"))
will no longer work if ticks
is of type POSIXct
. I guess that the timestamps I have in that vector no longer match the value range used for the x axis internally?
Re the first: you're right, that does not work. The docs for ganttAddTask
say the times are character strings, though, and if you do example(ganttAddTask)
I think it should work. (I can make it also work if you give POSIXt values instead of character strings, but of course that won't get into the CRAN release for many months, because they frown on frequent updates.)
On the second, can you supply a complete working example?
Thanks again.
OK, I re-visited the code I wrote a while ago today and I was able to fix all issues by converting the POSIXct
timestamps I had in my data via as.character()
before passing them to ganttAddTask()
. It feels a little strange that I have to do this, but it works fine if I do.
As for the axis-labeling issue, I was able to solve that by passing time.format="%H:%M"
to my plot()
call.
So all is well now. :-) Thank you very much for your help and for writing this fine library!
I tried the new release, but ran into the following issue when supplying
POSIXct
values forstart
andend
:Is that to be expected? Is there another way to accomplish this?