Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I´m trying to create a timeline where it shoudl be displayed important dates from my database according to the real time.
So, for instance, the timeline will display the Years, and some important event dates from my database:
Fields:
Event 1 = 01/07/2010
Event 2 = 10/12/2015
Event 3 = 18/09/2018
The timeline should be able to display the dates above according to the real time, (past, present and future), and the user will view where are the Events 1, 2 and 3 relataded from today´s date.
Doubts:
How should i create the Min Date and Max Date for the timeline, since my dates can be updated anytime in the database. So the timeline should be able to set the Min and Max Date according with the dates that will be displayed.
What type of chart is better to displayd this kind of situation?
Regards,
If I understood, I did something like this once with a line chart. In my case, each event had a start and end timestamp, but the end of one event was the start of the next. That may be your case as well. So I made the dimension my start timestamp, my expression was 1, and then my background color depended on the type of event.
pick(match(only({1} "Activity Type"),'Wrap','Rewrap','Idle','Delay','Unscheduled')
,rgb(38,164,38)
,rgb(255,205,155)
,rgb(152,231,152)
,rgb(234,106,106)
,rgb(235,235,235))
I used a fake legend to link those colors to the activity types, so that was my version of labeling the events. I used a very thick line, of course. Looks like I used a continuous axis and used this as my min and max date.
min({<[$(=concat({1<$Table-={'Calendar'},$Field-={'Start'}>} distinct $Field,']=,['))]=>} Start)
max({<[$(=concat({1<$Table-={'Calendar'},$Field-={'Start'}>} distinct $Field,']=,['))]=>} Start)
Not sure at the moment why I did that. Sorted by Start in ascending order.
As I recall, I'd previously done it as a stacked bar chart and event durations, but then something went wrong and that stopped working and I had to switch to a line chart.
Here, I applied the basic idea to swuehl's example.