Yet another script for OmniGraffle. This one generates a rough skeleton of a timeline, getting the items spaced out properly, but does not really do much else at the moment. With a little further modification, something like what is shown here can be made.
- Download timeline.zip (12 KB).
- Install the script.
- In OmniGraffle choose > Timeline.
- In the fantastic dialog that appears, enter some numerical data, such as: 1975 1979 1985 2001 2010. (There are further notes on this below.) Press OK.
- Decide how often scale tick marks should appear along the bottom of the scale. If you want a tick every five years, (assuming the numbers you've already put in are years) then enter 5 or 5.0, then press OK again.
- Behold, the majesty.
- Manually edit the events, to reflect what actually happened at a particular time.
Tips and other uses
When entering data, there's no need to keep it in order. 1979 1990 1985 will produce the same results as 1979 1985 1990.
If entering a lot of data it is a good idea to 'save' it for a while by copying it to the clipboard, then if you make a small error in entering it, which you notice when the timeline is created, you only have to paste and correct the error rather than typing it all in again. If you have lots and lots of data, using a text editor for it might be a bright idea.
The tick marks always start from the lowest data item that you enter. So, if you have (as above) 1975, the first tick is 1975. It often makes sense to enter a nice round number to start your line, then delete it. Same goes for the end.
Often the numbers on the ticks crash into each other. In this case, select the whole lot, lines, labels, events and all, and make it bigger. Alternatively, laboriously go through the whole timeline and delete every second label or something. This was done in the example timeline at the top of the page. (Additionally, the labels were rotated, for added drama.)
If your events are very close together, then they will also crash into each other. Move the label text up or down (using the arrow keys here makes it easier to keep it all aligned), then select the event lines for all the labels you've moved, and scale them all at once. This is easier than moving an event, then its line, then another event etc., and trying to keep it all aligned.
The spacing of the tick labels isn't ideal. When you edit them, they tend to not be aligned properly. If you edit the text, chances are they'll be mis-aligned. Seems to be that ticking and un-ticking "Wrap to Shape" in the text inspector wakes them up a bit. After doing this, manually positioning the first and last tick-labels, (left) then pressing the "Spread evenly between left and right objects" button in the alignment inspector often sorts things out (left, below, note the difference in the 1980 label).
- There is not a lot of error checking. As such, if you do anything out of the ordinary the script will almost certainly give strange—or no—results. If you do do something funny, OmniGraffle will give you the option to edit the script. Feel free! Let me know if you come up with anything great.
- Times are handled just as if they were numbers, so 12:30 will make it explode, and something more sensible like 1230 will make it put a mark 30% of the distance between 1200 and 1300, not mid-way. It's a bit of a mental scrabbling act to remember to convert from 12:30 to 1250. Hopefully I'll have some bright idea about how to handle this in the future.
- Leading zeroes on the input data are stripped off, so 0800 will become 800. Any leading zeroes will need to be manually added again to both the scale and any events.
- Multiple timelines are all drawn on the same place in the canvas. If you're going to be doing lots, move them when you're finished running the script so that the next one doesn't land on top.
Things to maybe get around to some nice day
- Handle times and dates, and combinations thereof more accurately.
- Join the event lines to the base timeline. (Currently this doesn't appear to be possible via OmniGraffle Applescript.)
- Somehow allow the labelling of every n-th tick line to be specified.
- Align the tick labels better. Quite easy to do with the align controls in OmniGraffle, but rather more difficult to do with Applescript.
- Make the script clever enough to not overlap events. Possibly just cycle through two or three default heights.
- Other suggestions and comments are more than welcome.
- Suggested by Peter Edwardsson, via the OmniGraffle mailing list.
- 1.0 (2006-02-20)
- Initial release. Apparently works with OmniGraffle version 4.1.1. Should also work fine with corresponding Pro versions of OmniGraffle, and possibly even 3.x versions.