]> git.cworth.org Git - acre/commit
Add support for a new TIMELINE style for drawing a data-set.
authorCarl Worth <cworth@cworth.org>
Thu, 7 Nov 2013 21:24:30 +0000 (13:24 -0800)
committerCarl Worth <cworth@cworth.org>
Thu, 7 Nov 2013 21:24:30 +0000 (13:24 -0800)
commitf38364b3004fb77dd8ebd6c6a37c66873f37e2b2
treeeed21772f783ebf033751da9979c0da06d971c2c
parent970682d49861e98bdad635128b9db3cbee48ffec
Add support for a new TIMELINE style for drawing a data-set.

For the TIMELINE style, each (X,Y) pair represents (start,stop) time
in the X dimension for a timeline bar to be drawn. The recently added
"_named" variant of add_data is also useful for supplying a name to be
drawn on the bar.

With multiple timelines within a chart, each one is positioned at a
different integer position along the Y axis, (and the Y axis range
computation is changed to preserve this).

There's only minimal cleverness to avoid collision of timeline label,
(the vertical position is cycled unconditionally).

More clever approaches would not change the vertical position if there
is no possibility of conflict, and would also reset to the top
position as soon as possible.

Other potential improvements to the TIMELINE style include:

  * Ensuring that a timeline label is visible whenever any portion of
    a timeline bar is visible.

  * Eliminating the rendering of numbers and ticks on the Y axis.
acre.c
acre.h