Question

looks like gantt_chart() doesn't work properly for following set of data:

tg_p = [ (0, 12), (0, 5), (0,13) ]
tg_v = [ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14']
tg_h = [ 'test', 'test2', 'test3' ]
tg_c = [ (1.0, 0.0, 0.0), (1.0, 0.7, 0.0), (0.0, 1.0, 0.0) ]
CairoPlot.gantt_chart('gantt-123', tg_p, 600, 300, tg_h, tg_v, tg_c)

it just renders one bar, any idea ?

thank you

Was it helpful?

Solution

There is a bug report here: https://bugs.launchpad.net/cairoplot/+bug/274181

try setting the tuple in lists, according to the reporter it should work.

Passing data like:

data = [(0,3), (4,5), (8,10)]

makes Gantt Chart crash, plotting all the pieces on the same line.

This, however, works:

data = [(0,3), [(4,5)], (8,10)]

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top