[reportlab-users] How to break a line graph?

David Frank david83 at sfsu.edu
Tue Jun 26 15:17:29 EDT 2007


Hi,

This forum has helped me a LOT in my previous issues and I am very
grateful for that. I am really looking forward to some help in this latest
question too. If someone could help me out, I would greatly appreciate it.

My issue is the one mentioned below in my previous post about the line
graph. If it is not possible to break the line graph, then is there
atleast a work around? Like, maybe something to change the color of the
line chart from one point to another to atleast indicate that there are
null values?

Thank you very much for your time.

Regards,

David Frank






Hi,

I am making a line chart [using HorizontalLineChart()] and I have an array
of values as the chartdata. Now, one of the arrays has some null values in
it. Eg.,

chartdata[2] = [100.2, 100.111, 50.2345, 50.0, None, None, None, None,
None, None, 106.651199, 50.34, 206.651, 1978.788, 39.787, 978.787, 18.88,
1.65, 2.99, 2.0]

Now the first 4 values (chartdata[0] to chartdata[3]) and the last 9
values (chartdata[10] to chartdata[19]) are not 'None' and then the rest
of the values are None. The graph is required to have a line drawn for the
first 4 values, then again a line drawn for the last 9 values. But, in the
result, I get a line joining the values chartdata[3] and chartdata[10],
making it appear to have a set of static values between these two values.
Using zeros instead of None will still not solve the problem since it
would appear that the values are zeros.

So, how do I prevent this joining line? In other words, when there is a
None in the chart data, how do I break the line for that value. Has
someone faced a similar kind of issue?

Any help will be greatly appreciated. Thank you for your time and effort.

Regards,

David Frank

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/reportlab-users/attachments/20070626/402e3010/attachment.htm>


More information about the reportlab-users mailing list