Message Boards Message Boards

1
|
1381 Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How to make a timeline plot with tooltips that display the dayname

I am wondering how to tell the TimelinePlot function to display the day name for the dates that are displayed with the the tooltip.
I think the option that would be used is LabelingFunction but I'm not sure how to specify the function.
I would like the tooltip to display the dayname day month year like Monday 18 February 2002. I read the documentation for LabelingFunction for TimelinePlot but I couldn't figure it out. This code outputs a date object formatted the way I want it:

DateObject[Now, "Day", DateFormat -> "Date"]

This is the output:

DateObject[{2022, 12, 
  14}, "Day", "Gregorian", -5., "SmearedUTC", "Date"]
POSTED BY: Peter Burbery
2 Replies

Is this what you are looking for?

DayRange[{2022, 1, 1}, {2022, 12, 31}, "Holiday"] //
 TimelinePlot[#,
   LabelingFunction -> (DateObject[First@#, "Day", DateFormat -> "Date"] &)] &
POSTED BY: Rohit Namjoshi

Yes this is the format I was looking for.

POSTED BY: Peter Burbery
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract