[reportlab-users] lineplot

Timothy Smith timothy at open-networks.net
Fri Dec 2 00:23:38 EST 2005


hi there i might have made the mistake of assuming line and linplot 
shared similar methods. i'm trying to convert my boring old line graphs 
to lineplot and getting the following error and i'm not sure why.

File "/usr/local/lib/python2.4/site-packages/reportlab/graphics/charts/lineplots.py", line 173, in calcPositions
    if type(datum[0]) == type(''):
TypeError: unsubscriptable object

my code is as follows.

	Chart = LinePlot()
		
	Chart.x = 70
	Chart.y = 150
		
	#Graph strings
	Title = String(500,500, SelectedVenue, fontSize=18)
	xAxisLabel = String (300, 80, 'For the days '+ FromDOW+' to '+ ToDOW+' between the dates of '+ FromDatefmt + ' to ' + ToDatefmt, fontSize=14)
	Chart.height = 350
	Chart.width = ChartLength-100
	Chart.data = ChartData

an example of ChartData is [[0.0, 0.0, 424.0, 1045.0, 271.0]]


works perfectly with 	HorizontalLinChart



More information about the reportlab-users mailing list