[reportlab-users] Time Series Charts - date stamps interpreted as integers

Kostadin Atanasov kostadin.atanasov at gmail.com
Mon Apr 3 18:02:12 EDT 2017


Looking for help with the following issue:

My line plot distorts the data, as it interprets the timestamps as
integers, i.e.:

20170227
20170228
20170301

While the distance between all three is 1 day, in integer terms the picture
is different:
- the distance between 20170227 and 20170228 is 1
- the distance between 20170228 and 20170301 is 73

As a result the line plot is distorted (stretched) at the points where the
month changes.

One possible solution is to use line chart, which has equispaced
categorical x-axis, however it accepts only ordered data points that start
with the very first category point. This doesn't work if:
- the two series are not perfectly aligned (e.g. one data series starts
several days later)
- or I have gaps in the data (which is normal, I just want gap in the graph
too)

Another possible solution is to still use the line plot, but instead of
integer representation of the dates, I put sequential integers, e.g.
0,1,2,3,4, etc. The problem is I cannot replace those values with custom
x-axis tick labels for presentation.

All examples given for time series include end-of-month dates, which is
fine, because they have roughly similar distance. Simply I am looking for
daily granularity

I read all possible documentation and forums but could not find a clear
answer to this issue.

Your help is much appreciated

KA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist2.pair.net/pipermail/reportlab-users/attachments/20170404/d7d878e6/attachment.html>


More information about the reportlab-users mailing list